taoran92 opened a new pull request, #10547:
URL: https://github.com/apache/paimon/pull/10547

   ### Purpose
   
   Closes #10546.
   
   A production use case needs a partial-update table to retain the latest 
status while retaining the channel associated with the earliest event. Sequence 
groups currently always prefer larger ordering values, so the two groups cannot 
independently choose their ordering direction.
   
   Add `fields.<ordering-fields>.sequence-group.sort-order` with `ascending` 
(the default, preserving existing behavior) and `descending` (prefer smaller 
ordering values). The direction applies to the entire ordering tuple for each 
group. Existing null handling and equal-value behavior are preserved.
   
   The change validates the configuration, preserves the direction during 
projected reads and column renames, and documents the option and compatibility 
considerations. For the issue's example, the status group retains version 
`200`, while the event group retains time `50` and its corresponding channel.
   
   ### Tests
   
   Passed 173 core tests covering merge behavior, schema validation, and schema 
evolution:
   
   ```shell
   mvn -pl paimon-core -am \
     -DwildcardSuites=none -DfailIfNoTests=false \
     
-Dtest=PartialUpdateMergeFunctionTest,SchemaValidationTest,SchemaEvolutionTest 
test
   ```
   
   Passed the Flink 1 integration test covering the issue's SQL example, 
projected reads, column rename, compaction, and null ordering values:
   
   ```shell
   mvn -pl paimon-flink/paimon-flink-common -am -Pflink1 \
     -DwildcardSuites=none -DfailIfNoTests=false \
     -Dtest=PartialUpdateITCase#testSequenceGroupSortOrder test
   ```
   
   Both runs used JDK 11 with Checkstyle, Spotless, and Enforcer enabled. `git 
diff --check` also passed. The documentation site build was not run locally 
because Yarn and the documentation dependencies are unavailable.
   


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