You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by "Zoltan Haindrich (JIRA)" <ji...@apache.org> on 2019/07/26 09:08:00 UTC

[jira] [Created] (CALCITE-3215) Simplification may not fully simplify IsNotNull expressions

Zoltan Haindrich created CALCITE-3215:
-----------------------------------------

             Summary: Simplification may not fully simplify IsNotNull expressions
                 Key: CALCITE-3215
                 URL: https://issues.apache.org/jira/browse/CALCITE-3215
             Project: Calcite
          Issue Type: Bug
            Reporter: Zoltan Haindrich
            Assignee: Zoltan Haindrich


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)