Vineet Garg created HIVE-20432:
----------------------------------

             Summary: Rewrite BETWEEN to IN for integer types for stats 
estimation
                 Key: HIVE-20432
                 URL: https://issues.apache.org/jira/browse/HIVE-20432
             Project: Hive
          Issue Type: Improvement
    Affects Versions: 4.0.0
            Reporter: Vineet Garg
            Assignee: Vineet Garg


IN clause provides better statistics estimation since predicates are equality 
based and it keeps into account selectivity of all values. BETWEEN is rewritten 
into {{>= AND <=}} i.e. non-equality predicates which cause worse estimation. 
For integer types BETWEEN could be rewritten into IN e.g. BETWEEN 4 and 7 is 
equivalent to IN (4,5,6,7).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to