virajjasani commented on code in PR #1884:
URL: https://github.com/apache/phoenix/pull/1884#discussion_r1622813437
##########
phoenix-core-server/src/main/java/org/apache/phoenix/hbase/index/IndexRegionObserver.java:
##########
@@ -546,9 +568,22 @@ private void
addOnDupMutationsToBatch(MiniBatchOperationInProgress<Mutation> min
List<Mutation> mutations = generateOnDupMutations(context,
(Put)m);
if (!mutations.isEmpty()) {
addOnDupMutationsToBatch(miniBatchOp, i, mutations);
+ context.setUpdateStatus(i,
BatchMutateContext.UpdateStatus.UPDATE);
} else {
- // empty list of generated mutations implies ON DUPLICATE
KEY IGNORE
- miniBatchOp.setOperationStatus(i, IGNORE);
+ // empty list of generated mutations implies
+ // 1) ON DUPLICATE KEY IGNORE if row already exists, OR
+ // 2) ON DUPLICATE KEY UPDATE if CASE expression is
specified and in each of
+ // them the new value is the same as the old value in the
ELSE-clause (empty
+ // cell timestamp will NOT be updated)
+ byte[] retVal = PInteger.INSTANCE.toBytes(0);
Review Comment:
That is also a good idea. On the other hand, we can also create new CF:CQ
pair in future to include more cells in the Result, so probably we don't need
to introduce new protobuf object?
--
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]