You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2015/06/18 20:11:00 UTC
[jira] [Resolved] (CALCITE-727) Constant folding involving CASE and
NULL
[ https://issues.apache.org/jira/browse/CALCITE-727?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde resolved CALCITE-727.
---------------------------------
Resolution: Fixed
Fix Version/s: 1.4.0-incubating
Fixed in http://git-wip-us.apache.org/repos/asf/incubator-calcite/commit/21cf1259.
[~ashutoshc], FYI.
> Constant folding involving CASE and NULL
> ----------------------------------------
>
> Key: CALCITE-727
> URL: https://issues.apache.org/jira/browse/CALCITE-727
> Project: Calcite
> Issue Type: Bug
> Reporter: Julian Hyde
> Assignee: Julian Hyde
> Fix For: 1.4.0-incubating
>
>
> There are a few Hive issues relating to constant reduction of NULL and CASE. Calcite should do the same.
> HIVE-9645:
> {code}
> select count(1) from store_sales where null=1;
> # should simplify to
> select count(1) from store_sales where false;
> {code}
> HIVE-9644:
> {code}
> select count(1) from store_sales where (case ss_sold_date when '1998-01-01' then 1 else null end)=1;
> # should simplify to
> 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)