You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by vl...@apache.org on 2018/09/20 12:14:15 UTC
calcite git commit: [CALCITE-2527] Simplify (c IS NULL) OR (c IS ...)
might result in AssertionError: result mismatch (pengzhiwei) [Forced Update!]
Repository: calcite
Updated Branches:
refs/heads/master 64ab9408a -> 52eda6d91 (forced update)
[CALCITE-2527] Simplify (c IS NULL) OR (c IS ...) might result in AssertionError: result mismatch (pengzhiwei)
fixes #846
Project: http://git-wip-us.apache.org/repos/asf/calcite/repo
Commit: http://git-wip-us.apache.org/repos/asf/calcite/commit/52eda6d9
Tree: http://git-wip-us.apache.org/repos/asf/calcite/tree/52eda6d9
Diff: http://git-wip-us.apache.org/repos/asf/calcite/diff/52eda6d9
Branch: refs/heads/master
Commit: 52eda6d911f06a542e1d681de294c77e8246e354
Parents: 32630d1
Author: pengzhiwei <pe...@icloud.com>
Authored: Thu Sep 20 13:48:40 2018 +0800
Committer: Vladimir Sitnikov <si...@gmail.com>
Committed: Thu Sep 20 15:14:00 2018 +0300
----------------------------------------------------------------------
core/src/main/java/org/apache/calcite/rex/RexSimplify.java | 2 --
.../src/test/java/org/apache/calcite/test/RexProgramTest.java | 7 +++++++
2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/calcite/blob/52eda6d9/core/src/main/java/org/apache/calcite/rex/RexSimplify.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/calcite/rex/RexSimplify.java b/core/src/main/java/org/apache/calcite/rex/RexSimplify.java
index 1f84dec..c5ae228 100644
--- a/core/src/main/java/org/apache/calcite/rex/RexSimplify.java
+++ b/core/src/main/java/org/apache/calcite/rex/RexSimplify.java
@@ -441,8 +441,6 @@ public class RexSimplify {
}
if (kind == pred.kind) {
return rexBuilder.makeLiteral(true);
- } else {
- return rexBuilder.makeLiteral(false);
}
}
return null;
http://git-wip-us.apache.org/repos/asf/calcite/blob/52eda6d9/core/src/test/java/org/apache/calcite/test/RexProgramTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/calcite/test/RexProgramTest.java b/core/src/test/java/org/apache/calcite/test/RexProgramTest.java
index d73e533..f991872 100644
--- a/core/src/test/java/org/apache/calcite/test/RexProgramTest.java
+++ b/core/src/test/java/org/apache/calcite/test/RexProgramTest.java
@@ -1547,6 +1547,13 @@ public class RexProgramTest extends RexProgramBuilderBase {
isNull(cRef)),
"OR(IS NOT NULL(?0.b), IS NULL(?0.c))");
+ // "b is null or b is not false" unchanged
+ checkSimplifyFilter(
+ or(isNull(bRef),
+ isNotFalse(bRef)),
+ "OR(IS NULL(?0.b), IS NOT FALSE(?0.b))"
+ );
+
// multiple predicates are handled correctly
checkSimplifyFilter(
and(