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 <[email protected]> Authored: Fri Jan 20 19:06:58 2017 +0530 Committer: Rajeshbabu Chintaguntla <[email protected]> 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()) {
