mdayakar commented on code in PR #4697:
URL: https://github.com/apache/hive/pull/4697#discussion_r1327335193
##########
hbase-handler/src/java/org/apache/hadoop/hive/hbase/HBaseStorageHandler.java:
##########
@@ -503,6 +509,19 @@ public static DecomposedPredicate decomposePredicate(
continue;
}
}
+
+ // In HBase, Keys are sorted lexicographically so the byte
representation of negative values comes after the positive values
+ // So don't pushdown the predicate if any constant value is a negative
number.
+ // if first condition constant value is less than 0 then don't
pushdown the predicate
+ if (((Number)
searchConditions.get(0).getConstantDesc().getValue()).longValue() < 0 && scSize
== 2) {
Review Comment:
If _`searchConditions`_ list is empty then the flow will not come here as it
will return from
https://github.com/apache/hive/pull/4697/files/8aa95e97fea1bc4630950ddc2a74b0fad8ddb685#diff-417b5504d5dc3be64c9bbb736f30e2733423337e7b8c7d90bd37babff945c440R447
itself.
`if (scSize < 1 || 2 < scSize) {`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]