Member since
09-05-2017
2
Posts
0
Kudos Received
0
Solutions
09-12-2018
11:22 PM
Thank you @jcamachorodriguez for your reply and for creating HIVE-17668. I'm glad to know that I'm not alone
:) I
will try to analyze the log files of HS2 in order to dig the CBO problem. Although
I've also arrived to the same conclusion that exposing the window function to
the outer most query may alter the results, I'm still not able to figure out an
example where pushing the
predicates changes the results
depending if a window function is present in the select statement or not... If
you have any example showing this behavior, I would be grateful. Concerning
FIRST_VALUE, according to my understanding, it will not respond to my needs: It
will not filter the records. If I have 2 versions of the same record id, using
FIRST_VALUE (on all the columns) will return both records with correct values and
then I would use a distinct. I'm not sure it will be more efficient than a
ROW_NUMBER + filter, correct me if I'm wrong... Regards, Christian
... View more