Thomas Rebele created HIVE-30036:
------------------------------------

             Summary: Prefilter pushdown for range predicates
                 Key: HIVE-30036
                 URL: https://issues.apache.org/jira/browse/HIVE-30036
             Project: Hive
          Issue Type: Improvement
            Reporter: Thomas Rebele


I noticed that in query13.q for most tables a prefilter is extracted from the 
complex {{AND(OR(AND(...), ...), OR(AND(...), ...)}} filter of the selectivity. 
However, for table store_sales [only some IS NULL 
filters|https://github.com/apache/hive/blob/2be30b71b6a112edde13d2ea1a11144b5abf1c04/ql/src/test/results/clientpositive/perf/tpcds30tb/tez/cbo_query13.q.out#L9]
 are extracted, even though it would be possible to combine the predicates on 
ss_sales_price and ss_net_profit to ss_sales_price BETWEEN 50.00 AND 200.00 and 
ss_net_profit BETWEEN 50 AND 300. Especially the latter can reduce the amount 
of processed rows.

I replaced the {{field BETWEEN a_1 AND b_1}} with {{{}field >= a_1 AND field <= 
b_1{}}}, which is not pushed down either. When I remove the upper bound, i.e., 
{{{}field >= a_1{}}}, then the common part {{field >= min(a_1, a_2, ...)}} is 
pushed down as a prefilter.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to