GeorryHuang commented on a change in pull request #4105:
URL: https://github.com/apache/hbase/pull/4105#discussion_r804542864
##########
File path:
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegion.java
##########
@@ -4937,11 +4937,11 @@ private CheckAndMutateResult
checkAndMutateInternal(CheckAndMutate checkAndMutat
boolean valueIsNull =
comparator.getValue() == null || comparator.getValue().length ==
0;
if (result.isEmpty() && valueIsNull) {
- matches = true;
- } else if (result.size() > 0 && result.get(0).getValueLength() ==
0 && valueIsNull) {
- matches = true;
+ matches = op != CompareOperator.NOT_EQUAL;
Review comment:
As far as i know, checkAndMutate ignores the case where the comparator's
value is null or empty. If the value of result is empty too, no matter what the
comparator is, matches set as true. If we change the logic of NOT_EQUAL, should
we also change logic such as GREATER and LESS?
--
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]