PyRSA opened a new pull request, #8048:
URL: https://github.com/apache/paimon/pull/8048
[core] Support nested sequence fields in FieldNestedUpdateAgg operator
### Purpose
[Feature] Add field.{fieldName}.nested-sequence-field configuration for
nested_update function
[Feature] Support sequence fields in FieldNestedUpdateAgg operator to ensure
correct data updates
Expected behavior:
| **case** | **Input A**
| **Input B**
| **Current Output**
| **Expected Output** |
| ---------------------------------------------- |
------------------------------------------------------------ |
------------------------------------------------------------ |
------------------------------------------------------------ |
------------------------------------------------------------ |
| Single Seq Out-of-order | [(0, 0, "A", 1), (0, 1,
"b", 3)] | [(0, 1, "B_late", 2)]
| [(0, 0, "A", 1), (0, 1, "B_late", 2)] ❌
| [(0, 0, "A", 1), (0, 1, "b", 3)] |
| Multi Seq Out-of-order - Primary Wins | [(1, 0, "A", 1, ts3), (0,
1, "B", 2, ts1), (1, 1, "C", 1, ts2)] | [(0, 1, "b_ignored", 1, ts3), (1, 1,
"C_updated_by_ts", 1, ts3)] | [(1, 0, "A", 1, ts3), (0, 1, "b_ignored", 1,
ts3), (1, 1, "C_updated_by_ts", 1, ts3)] ❌ | [(1, 0, "A", 1, ts3), (0, 1, "B",
2, ts1), (1, 1, "C_updated_by_ts", 1, ts3)] |
| Multi Seq Out-of-order - Secondary Tie-breaker | [(1, 0, "A", 1, ts2), (0,
1, "B", 2, ts1), (1, 1, "C", 1, ts2)] | [(1, 0, "A_late_updated_by_ts", 1,
ts1)] | [(1, 0, "A_late_updated_by_ts", 1, ts1), (0, 1,
"B", 2, ts1), (1, 1, "C", 1, ts2)] ❌ | [(1, 0, "A", 1, ts2), (0, 1, "B", 2,
ts1), (1, 1, "C", 1, ts2)] |
### Tests
-
org.apache.paimon.mergetree.compact.aggregate.FieldAggregatorTest#testFieldNestedUpdateAggWithSequenceField
-
org.apache.paimon.mergetree.compact.aggregate.FieldAggregatorTest#testFieldNestedUpdateAggWithMultipleSequenceFields
-
org.apache.paimon.mergetree.compact.aggregate.FieldAggregatorTest#testFieldNestedUpdateAggWithSequenceFieldWithoutNestedKey
-
org.apache.paimon.mergetree.compact.aggregate.FieldAggregatorTest#testFieldNestedUpdateAggWithCountLimitWithSequenceFieldWithoutNestedKey
-
org.apache.paimon.mergetree.compact.aggregate.FieldAggregatorTest#testFieldNestedUpdateAggWithCountLimitWithSequenceField
### API and Format
No Changes.
### Documentation
docs/docs/primary-key-table/merge-engine/aggregation.mdx
--
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]