taoran92 opened a new pull request, #1226: URL: https://github.com/apache/paimon-rust/pull/1226
### Purpose Closes #1225. Partial-update sequence groups currently ignore `descending` and always retain larger ordering values. A table that should keep the latest status and the earliest event's channel therefore returns `200/active` with `100/organic`, instead of `200/active` with `50/referral`. Port the per-group ordering behavior introduced by [apache/paimon#10547](https://github.com/apache/paimon/pull/10547), addressing the use case in [apache/paimon#10546](https://github.com/apache/paimon/issues/10546). ### Brief change log - Parse and validate `fields.<ordering-fields>.sequence-group.sort-order`, defaulting to `ascending` and accepting `descending` case-insensitively. - Apply each group's direction in the shared merge function used by write flushes and reads, including composite ordering fields, aggregation, and deletion. Preserve existing null and equal-value behavior, including the distinction between a top-level null and `ROW(NULL)`. - Preserve direction during projected reads and column renames without treating the direction literal as a column name. - Add Rust regression tests and Python binding tests for independent groups, input order, same-flush and cross-commit merges, projections, and renames. Python Native callers benefit from the Rust implementation. Sequence-group support in the independent Python backend remains a separate feature. ### Tests Passed on the submitted commit: - 27 sequence-group tests and 88 partial-update tests (the selections overlap). - 143 schema tests and 21 aggregation configuration tests. - Python binding build and all 53 tests in `bindings/python/tests/test_write.py`. - Eight additional local integration cases covering descending deletion and reinsertion, empty and key-only projections, and Python Native routing with reader fallback prohibited. The independent Python backend continues to reject sequence groups explicitly. - `cargo +1.98.0 fmt --all -- --check`. - `cargo +1.98.0 clippy --locked --all-targets --workspace --features fulltext,vortex -- -D warnings`. - `git diff --check`. The full feature-enabled test suite, standalone compaction, and Java/Rust file interoperability were not run. ### API and Format Adds a table option with the same name and semantics as Java. Existing tables retain their default ascending behavior. No public Rust API or storage format changes. Changing direction cannot recover values discarded by earlier merges. All readers, writers, and compaction jobs must support the option before using `descending`; older clients may ignore it. ### Documentation Document the option, ordering semantics, example, validation requirements, and compatibility considerations in `docs/src/sql.md`. Update stale statements about existing partial-update write support. -- 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]
