Repository: phoenix Updated Branches: refs/heads/4.8-HBase-0.98 28bf0ef55 -> 5b6e7b452
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/5b6e7b45 Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/5b6e7b45 Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/5b6e7b45 Branch: refs/heads/4.8-HBase-0.98 Commit: 5b6e7b45231bcc97bbd80851ce8632ef3b1e1342 Parents: 28bf0ef Author: Rajeshbabu Chintaguntla <[email protected]> Authored: Fri Jan 20 19:10:42 2017 +0530 Committer: Rajeshbabu Chintaguntla <[email protected]> Committed: Fri Jan 20 19:10:42 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/5b6e7b45/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()) {
