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

[jira] [Created] (CALCITE-2526) Simplify OR with comparisons leads to NPE

Vladimir Sitnikov created CALCITE-2526:
------------------------------------------

             Summary: Simplify OR with comparisons leads to NPE
                 Key: CALCITE-2526
                 URL: https://issues.apache.org/jira/browse/CALCITE-2526
             Project: Calcite
          Issue Type: Bug
          Components: core
    Affects Versions: 1.17.0
            Reporter: Vladimir Sitnikov
            Assignee: Julian Hyde


{code:java}
    checkSimplify2(
        or(lt(vInt(), nullInt), ne(literal(0), vInt())),
        "...", "...");
{code}
{noformat}
java.lang.NullPointerException
	at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:212)
	at com.google.common.collect.Cut$BelowValue.<init>(Cut.java:293)
	at com.google.common.collect.Cut.belowValue(Cut.java:288)
	at com.google.common.collect.Range.atLeast(Range.java:272)
	at org.apache.calcite.rex.RexSimplify.range(RexSimplify.java:1561)
	at org.apache.calcite.rex.RexSimplify.residue(RexSimplify.java:1093)
	at org.apache.calcite.rex.RexSimplify.simplifyUsingPredicates(RexSimplify.java:1036)
	at org.apache.calcite.rex.RexSimplify.simplifyComparison(RexSimplify.java:288)
	at org.apache.calcite.rex.RexSimplify.simplifyComparison(RexSimplify.java:218)
	at org.apache.calcite.rex.RexSimplify.simplify_(RexSimplify.java:209)
	at org.apache.calcite.rex.RexSimplify.simplifyNot(RexSimplify.java:378)
	at org.apache.calcite.rex.RexSimplify.simplify_(RexSimplify.java:185)
	at org.apache.calcite.rex.RexSimplify.lambda$simplify$0(RexSimplify.java:175)
	at org.apache.calcite.rex.RexSimplify.verify(RexSimplify.java:1154)
	at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:175)
	at org.apache.calcite.rex.RexSimplify.simplifyOrTerms(RexSimplify.java:349)
	at org.apache.calcite.rex.RexSimplify.simplifyOr(RexSimplify.java:1115)
	at org.apache.calcite.rex.RexSimplify.simplify_(RexSimplify.java:183)
	at org.apache.calcite.rex.RexSimplify.lambda$simplify$0(RexSimplify.java:175)
	at org.apache.calcite.rex.RexSimplify.verify(RexSimplify.java:1154)
	at org.apache.calcite.rex.RexSimplify.simplify(RexSimplify.java:175)
	at org.apache.calcite.test.RexProgramTest.checkSimplify2(RexProgramTest.java:150)
{noformat}



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