You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Zoltan Haindrich (JIRA)" <ji...@apache.org> on 2018/04/05 15:44:00 UTC

[jira] [Commented] (CALCITE-2240) Predicate push into CASE statment doesn't happen in some cases

    [ https://issues.apache.org/jira/browse/CALCITE-2240?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16427140#comment-16427140 ] 

Zoltan Haindrich commented on CALCITE-2240:
-------------------------------------------

opened pullrequest: https://github.com/apache/calcite/pull/658

> Predicate push into CASE statment doesn't happen in some cases
> --------------------------------------------------------------
>
>                 Key: CALCITE-2240
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2240
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Julian Hyde
>            Priority: Major
>
> [CaseShuttle|https://github.com/apache/calcite/blob/8139acb78b100483fbafb078fb82d07f921abef0/core/src/main/java/org/apache/calcite/rel/rules/ReduceExpressionsRule.java#L562] may make the optimization but the functions return value doesn't depend on that.
> For the following query the =1 is not pushed into the case.
> {code}
> select empno from emp where case when sal > 1000 then empno else sal end = 1
> {code}



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