You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@phoenix.apache.org by ma...@apache.org on 2015/09/03 23:41:50 UTC
[03/12] phoenix git commit: PHOENIX-2141 ComparisonExpression should
return Boolean null if either operand is null (bug fix)
PHOENIX-2141 ComparisonExpression should return Boolean null if either operand is null (bug fix)
Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/83d38134
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/83d38134
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/83d38134
Branch: refs/heads/calcite
Commit: 83d381341eccfacac650f5eeb9006a0d21ef0a0f
Parents: 80f3e9f
Author: maryannxue <we...@intel.com>
Authored: Tue Aug 25 13:43:08 2015 -0400
Committer: maryannxue <we...@intel.com>
Committed: Tue Aug 25 13:43:08 2015 -0400
----------------------------------------------------------------------
.../main/java/org/apache/phoenix/compile/WhereOptimizer.java | 5 +++++
1 file changed, 5 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/phoenix/blob/83d38134/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
----------------------------------------------------------------------
diff --git a/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java b/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
index c575c2e..1caec55 100644
--- a/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
+++ b/phoenix-core/src/main/java/org/apache/phoenix/compile/WhereOptimizer.java
@@ -424,6 +424,11 @@ public class WhereOptimizer {
public Iterator<Expression> visitEnter(AndExpression node) {
return node.getChildren().iterator();
}
+
+ @Override
+ public Expression visit(LiteralExpression node) {
+ return nodesToRemove.contains(node) ? null : node;
+ }
@Override
public Expression visitLeave(AndExpression node, List<Expression> l) {