hive-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashutosh Chauhan (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (HIVE-9644) Fold case & when udfs
Date Wed, 06 May 2015 22:13:59 GMT

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

Ashutosh Chauhan updated HIVE-9644:
-----------------------------------
    Summary: Fold case & when udfs  (was: CASE comparison operator rotation optimization)

> Fold case & when udfs
> ---------------------
>
>                 Key: HIVE-9644
>                 URL: https://issues.apache.org/jira/browse/HIVE-9644
>             Project: Hive
>          Issue Type: Bug
>          Components: Logical Optimizer
>    Affects Versions: 0.14.0, 1.0.0, 1.1.0
>            Reporter: Gopal V
>            Assignee: Ashutosh Chauhan
>         Attachments: HIVE-9644.1.patch, HIVE-9644.2.patch, HIVE-9644.3.patch, HIVE-9644.patch
>
>
> Constant folding for queries don't kick in for some automatically generated query patterns
which look like this.
> {code}
> hive> explain select count(1) from store_sales where (case ss_sold_date when '1998-01-01'
then 1 else null end)=1;
> {code}
> This should get rewritten by pushing the equality into the case branches.
> {code}
> select count(1) from store_sales where (case ss_sold_date when '1998-01-01' then 1=1
else null=1 end);
> {code}
> Ending up with a simplified filter condition, resolving itself as 
> {code}
> select count(1) from store_sales where ss_sold_date= '1998-01-01' ;
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message