yihua opened a new pull request, #19739: URL: https://github.com/apache/hudi/pull/19739
### Change Logs closes #19738 A table still at table version 1 can carry no `hoodie.table.precombine.field`, since that property is only written at table creation and only started being written in 0.8.0, and no handler in the version 1 to 6 upgrade chain backfills it. `OneToTwoUpgradeHandler` now records it alongside the record key, partition fields and base file format it already backfills, but only once the field resolves against the table schema, falling back to the writer's schema for a table with no committed data. `HoodieWriteConfig.PRECOMBINE_FIELD_NAME` defaults to "ts", which every write config materializes whether or not the user asked for it, so recording it unconditionally would leave an ordering field no reader can resolve and would fail table config validation for the next writer that configures a real one. ### Impact Tables upgraded off table version 1 keep the ordering field their writer merges on, so copy-on-write updates, Spark SQL DML, merge-on-read snapshot reads and Flink no longer silently fall back to no ordering. Tables that already record an ordering field are unaffected. ### Risk level (write none, low medium or high below) low Confined to the version 1 to 2 upgrade path, and the new property is only written when it resolves against a schema. `TestUpgradeDowngrade` passes in full (38 tests); reverting the handler change fails the new assertions with `expected: <timestamp> but was: <null>`. ### Documentation Update none ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Change Logs and Impact were stated clearly - [x] Adequate tests were added if applicable - [x] CI passed -- 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]
