You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (Jira)" <ji...@apache.org> on 2020/10/11 22:49:00 UTC

[jira] [Commented] (CALCITE-4325) RexSimplify/Sarg incorrectly simplifies complex expressions with NULL

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

Julian Hyde commented on CALCITE-4325:
--------------------------------------

Patches for test cases are fine but please use 'patch -p1' format rather than 'patch -p0' (files have 'a/' and 'b/' prefixes, as produced by 'git diff'). p1 format is the standard in the open source world.

> RexSimplify/Sarg incorrectly simplifies complex expressions with NULL
> ---------------------------------------------------------------------
>
>                 Key: CALCITE-4325
>                 URL: https://issues.apache.org/jira/browse/CALCITE-4325
>             Project: Calcite
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.26.0
>         Environment: All environments
>            Reporter: Igor Lozynskyi
>            Priority: Major
>         Attachments: rex-simplify-issue-tests.patch
>
>
> In Calcite 1.26, the Rex expressions like follows:
> {code:java}
> (deptno = 20 OR deptno IS NULL) AND deptno = 10{code}
> Are simplified to:
> {code:java}
> deptno IS NULL{code}
> Instead of:
> {code:java}
> FALSE{code}
> Similarly, the following expression:
> {code:java}
> (deptno <> 20 OR deptno IS NULL) AND deptno = 10{code}
> Is simplified to:
> {code:java}
> deptno = 10 OR deptno IS NULL{code}
> Instead of:
> {code:java}
> deptno = 10{code}
> A diff with related unit tests (for RelBuilderTest.java) is in the attachment.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)