You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2021/04/02 18:03:00 UTC

[jira] [Updated] (CALCITE-4562) Improve simplification of "expression IS TRUE"

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

ASF GitHub Bot updated CALCITE-4562:
------------------------------------
    Labels: pull-request-available  (was: )

> Improve simplification of "expression IS TRUE"
> ----------------------------------------------
>
>                 Key: CALCITE-4562
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4562
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Julian Hyde
>            Assignee: Julian Hyde
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> When simplifying "expression IS TRUE", RexSimplify should simplify "expression" in an "unknown as FALSE" context, and this should allow more simplifications than at present.
> Currently "(x LIKE '%') IS TRUE" simplifies to "(x IS NOT NULL) IS TRUE", but after this change will simplify to "x IS NOT NULL". The following test illustrates:
> {code}
>     final RexNode ref = input(tVarchar(true, 10), 0);
>     checkSimplify(isTrue(like(ref, literal("%"))), "IS NOT NULL($0)");
> {code}
> Similarly "IS FALSE", "IS NOT TRUE", etc.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)