You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Vladimir Sitnikov (JIRA)" <ji...@apache.org> on 2018/08/07 07:53:00 UTC

[jira] [Assigned] (CALCITE-2449) RexSimplify overhaul

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

Vladimir Sitnikov reassigned CALCITE-2449:
------------------------------------------

    Assignee: Vladimir Sitnikov  (was: Julian Hyde)

> RexSimplify overhaul
> --------------------
>
>                 Key: CALCITE-2449
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2449
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: Vladimir Sitnikov
>            Assignee: Vladimir Sitnikov
>            Priority: Major
>
> I would like to update \{{RexSimplify}} as follows:
> 1) Avoid multiple passes over the same expressions. Current logic calls "simplify" in multiple places, and it might cause simplification of the same tree again and again.
> 2) I would like to rework \{{unknownAsFalse}} into support for \{{IS TRUE}}. Current support for \{{unknownAsFalse}} is hard to follow, and it looks like IS_TRUE(expr) allows for the same optimizations. In other words, "unknownAsFalse" would become a silent adding of IS_TRUE on top of the input expression. Then rules like \{{OR(x, y) IS TRUE ==> x IS TRUE or y IS TRUE}} would push \{{IS TRUE}} downstream.
> 3) I would like to "reorder" predicates in a defined order (e.g. rewrite \{{5=x ==> x=5}} or \{{(x=1 or y=2) and (z=3)}} ==> \{{(z=3) and (x=1 or y=2)}}. It looks like adding \{{int nodeCount;}} to \{{RexNode}} would be helpful to rank rex nodes.
> 4) There are other bugs identified by expression fuzzer (like {{and(null, not(null))}} conversion to true and so on)



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