You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "pengzhiwei (JIRA)" <ji...@apache.org> on 2018/09/23 09:24:00 UTC

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

    [ https://issues.apache.org/jira/browse/CALCITE-2526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16625042#comment-16625042 ] 

pengzhiwei edited comment on CALCITE-2526 at 9/23/18 9:23 AM:
--------------------------------------------------------------

This issue has not existed  in the latest commit.And I have add a test case for this issue at :https://github.com/apache/calcite/pull/858


was (Author: pzw2018):
This issue has not existed  in the latest commit.

> 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
>            Priority: Major
>              Labels: newbie
>
> {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)