hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vineet Garg (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-20432) Rewrite BETWEEN to IN for integer types for stats estimation
Date Fri, 07 Sep 2018 17:24:00 GMT

     [ https://issues.apache.org/jira/browse/HIVE-20432?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Vineet Garg updated HIVE-20432:
-------------------------------
       Resolution: Fixed
    Fix Version/s: 4.0.0
           Status: Resolved  (was: Patch Available)

Pushed to master.

> 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
>            Priority: Major
>             Fix For: 4.0.0
>
>         Attachments: HIVE-20432.1.patch, HIVE-20432.2.patch, HIVE-20432.3.patch, HIVE-20432.4.patch,
HIVE-20432.5.patch
>
>
> 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)

Mime
View raw message