Return-Path: X-Original-To: apmail-phoenix-commits-archive@minotaur.apache.org Delivered-To: apmail-phoenix-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id BEF7D181C5 for ; Tue, 25 Aug 2015 18:10:17 +0000 (UTC) Received: (qmail 34260 invoked by uid 500); 25 Aug 2015 18:10:17 -0000 Delivered-To: apmail-phoenix-commits-archive@phoenix.apache.org Received: (qmail 34221 invoked by uid 500); 25 Aug 2015 18:10:17 -0000 Mailing-List: contact commits-help@phoenix.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@phoenix.apache.org Delivered-To: mailing list commits@phoenix.apache.org Received: (qmail 34211 invoked by uid 99); 25 Aug 2015 18:10:17 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Aug 2015 18:10:17 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 75166E01F4; Tue, 25 Aug 2015 18:10:17 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: maryannxue@apache.org To: commits@phoenix.apache.org Message-Id: <679254f77ff443b0b89faa0a6a4b801d@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: phoenix git commit: PHOENIX-2141 ComparisonExpression should return Boolean null if either operand is null (bug fix) Date: Tue, 25 Aug 2015 18:10:17 +0000 (UTC) Repository: phoenix Updated Branches: refs/heads/4.5-HBase-0.98 578b5fc04 -> 0f44f3cc6 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/0f44f3cc Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/0f44f3cc Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/0f44f3cc Branch: refs/heads/4.5-HBase-0.98 Commit: 0f44f3cc6bd8048f67ac2aab5768929319a3422f Parents: 578b5fc Author: maryannxue Authored: Tue Aug 25 14:10:05 2015 -0400 Committer: maryannxue Committed: Tue Aug 25 14:10:05 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/0f44f3cc/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 601eee1..01ec1bd 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 @@ -423,6 +423,11 @@ public class WhereOptimizer { public Iterator 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 l) {