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 2019/08/02 15:11:00 UTC

[jira] [Resolved] (CALCITE-3215) Simplification may have not fully simplified IS NOT NULL expressions

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

Zoltan Haindrich resolved CALCITE-3215.
---------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.21.0

fixed in [1e999374f3a40c26d1cb3469211f10cd2fdc0622|https://github.com/apache/calcite/commit/1e999374f3a40c26d1cb3469211f10cd2fdc0622]

> Simplification may have not fully simplified IS NOT NULL expressions
> --------------------------------------------------------------------
>
>                 Key: CALCITE-3215
>                 URL: https://issues.apache.org/jira/browse/CALCITE-3215
>             Project: Calcite
>          Issue Type: Bug
>            Reporter: Zoltan Haindrich
>            Assignee: Zoltan Haindrich
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.21.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> CALCITE-2929 have added a safety check to avoid simplifying problematic cases.
> The safety check apparently misses some kinds, for example: {{UNARY_PLUS}}
> {code}
>   @Test public void testIsNullSimplificationWithUnaryPlus() {
>     RexNode expr =
>         isNotNull(coalesce(unaryPlus(vInt(1)), vIntNotNull(0)));
>     RexNode s = simplify.simplifyUnknownAs(expr, RexUnknownAs.UNKNOWN);
>     assertThat(expr.isAlwaysTrue(), is(true));
>     assertThat(s, is(trueLiteral));
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)