jcamachor commented on a change in pull request #1492:
URL: https://github.com/apache/hive/pull/1492#discussion_r487546646



##########
File path: 
ql/src/test/results/clientpositive/perf/tez/constraints/cbo_query74.q.out
##########
@@ -147,7 +147,7 @@ HiveSortLimit(sort0=[$2], sort1=[$0], sort2=[$1], 
dir0=[ASC], dir1=[ASC], dir2=[
                           HiveProject(ss_sold_date_sk=[$0], 
ss_customer_sk=[$3], ss_net_paid=[$20])
                             HiveTableScan(table=[[default, store_sales]], 
table:alias=[store_sales])
                       HiveProject(d_date_sk=[$0])
-                        HiveFilter(condition=[AND(=($1, 1999), IN($1, 1998, 
1999))])
+                        HiveFilter(condition=[=($1, 1999)])

Review comment:
       What seems to happen is that we close these IN clauses before we call 
the join propagation rule, which leads to the inference of new predicates. Then 
the RexSimplify does not deal with the IN+EQUALS clauses and the 
HivePointLookup cannot deal with the EQUALS.
   We could possibly change the rules order too but I was not brave enough to 
do that :) Plus I think supporting the degenerate case of EQUALS in 
HivePointLookup should be fine.
   Iirc there is work going on in Calcite to finally have more extensive 
support for IN in RexSimplify, which you suggested some time ago... I hope that 
work goes in and we can simplify this whole code path.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to