PyRSA commented on code in PR #11163:
URL: https://github.com/apache/paimon/pull/11163#discussion_r4652017710


##########
paimon-core/src/main/java/org/apache/paimon/mergetree/compact/aggregate/FieldNestedUpdateAgg.java:
##########
@@ -196,6 +217,14 @@ public Object retract(Object accumulator, Object 
retractField) {
         }
     }
 
+    private boolean shouldUpdate(InternalRow newRow, InternalRow oldRow) {
+        if (!hasSequenceField) {
+            return true;
+        }
+        int comparison = compareSequence(newRow, oldRow);
+        return comparison > 0 || (comparison == 0 && overwriteOnEqualSequence);

Review Comment:
   Added validation to reject the incompatible combination of sequence.field 
and nested_update with nested-sequence-overwrite-on-equal=false. This avoids 
inconsistent first-wins results across commit boundaries without introducing 
additional aggregation state.



-- 
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]

Reply via email to