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/09/23 13:28:00 UTC

[jira] [Updated] (CALCITE-2526) Add test for OR with nullable comparisons

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

Vladimir Sitnikov updated CALCITE-2526:
---------------------------------------
    Summary: Add test for OR with nullable comparisons  (was: Simplify OR with comparisons leads to NPE)

> Add test for OR with nullable comparisons
> -----------------------------------------
>
>                 Key: CALCITE-2526
>                 URL: https://issues.apache.org/jira/browse/CALCITE-2526
>             Project: Calcite
>          Issue Type: Improvement
>          Components: core
>    Affects Versions: 1.17.0
>            Reporter: Vladimir Sitnikov
>            Assignee: Julian Hyde
>            Priority: Major
>              Labels: newbie
>             Fix For: 1.18.0
>
>
> {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)