Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 9C7EC200C02 for ; Fri, 20 Jan 2017 14:24:54 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 9623B160B48; Fri, 20 Jan 2017 13:24:54 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id E1898160B39 for ; Fri, 20 Jan 2017 14:24:53 +0100 (CET) Received: (qmail 71842 invoked by uid 500); 20 Jan 2017 13:24:51 -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 71833 invoked by uid 99); 20 Jan 2017 13:24:51 -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; Fri, 20 Jan 2017 13:24:51 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 3E4FDDFB0E; Fri, 20 Jan 2017 13:24:51 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: rajeshbabu@apache.org To: commits@phoenix.apache.org Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: phoenix git commit: PHOENIX-3608 KeyRange interset should return EMPTY_RANGE when one of it is NULL_RANGE(Rajeshbabu) Date: Fri, 20 Jan 2017 13:24:51 +0000 (UTC) archived-at: Fri, 20 Jan 2017 13:24:54 -0000 Repository: phoenix Updated Branches: refs/heads/4.x-HBase-1.1 e2b358775 -> 7936c2be2 PHOENIX-3608 KeyRange interset should return EMPTY_RANGE when one of it is NULL_RANGE(Rajeshbabu) Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/7936c2be Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/7936c2be Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/7936c2be Branch: refs/heads/4.x-HBase-1.1 Commit: 7936c2be2fcc05a351e2687adcdac22438393872 Parents: e2b3587 Author: Rajeshbabu Chintaguntla Authored: Fri Jan 20 19:06:58 2017 +0530 Committer: Rajeshbabu Chintaguntla Committed: Fri Jan 20 19:06:58 2017 +0530 ---------------------------------------------------------------------- .../src/main/java/org/apache/phoenix/query/KeyRange.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/phoenix/blob/7936c2be/phoenix-core/src/main/java/org/apache/phoenix/query/KeyRange.java ---------------------------------------------------------------------- diff --git a/phoenix-core/src/main/java/org/apache/phoenix/query/KeyRange.java b/phoenix-core/src/main/java/org/apache/phoenix/query/KeyRange.java index f4bf793..babce9d 100644 --- a/phoenix-core/src/main/java/org/apache/phoenix/query/KeyRange.java +++ b/phoenix-core/src/main/java/org/apache/phoenix/query/KeyRange.java @@ -356,10 +356,9 @@ public class KeyRange implements Writable { boolean newUpperInclusive; // Special case for null, is it is never included another range // except for null itself. - if (this == IS_NULL_RANGE) { - if (range == IS_NULL_RANGE) { + if (this == IS_NULL_RANGE && range == IS_NULL_RANGE) { return IS_NULL_RANGE; - } + } else if(this == IS_NULL_RANGE || range == IS_NULL_RANGE) { return EMPTY_RANGE; } if (lowerUnbound()) {