yihua opened a new pull request, #19803: URL: https://github.com/apache/hudi/pull/19803
### Describe the issue this Pull Request addresses issue: #19738 (this is the `master` half; #19739 carries the same fix to `branch-0.x`, the line where the upgrade path actually runs) ### Summary and Changelog `hoodie.table.precombine.field` is only written at table creation, and only since 0.8.0, so a table still at table version 1 can record no ordering field even though its writer merges on one, and no handler in the version 1 to 6 upgrade chain backfills it. `OneToTwoUpgradeHandler` now records it from the write config, but only when the table records none. The same handler also returned an empty `TableConfigChangeSet` rather than the properties it had just computed, so the record key, partition fields and base file format were dropped as well. That arrived with the change set refactor, which `branch-0.x` does not have, and every other handler that computes properties returns them. A top level ordering field is recorded once the table schema has it, falling back to the writer's schema for a table with no committed data; that check is what keeps out the default a write config materializes. A field nested under dot notation is recorded as configured, since a default is never nested. Failing to read or parse the schema leaves the fields unrecorded rather than failing the upgrade, which gates every write on the table. ### Impact `UpgradeDowngrade` rejects any table below version 6 on this line, so nothing reaches this handler today and the change is inert. It keeps `master` from carrying the defect back if pre-version-6 upgrades are supported here again, and keeps the handler in sync with `branch-0.x`. ### Risk Level low Confined to the version 1 to 2 upgrade, which no table currently reaches on this line, and the ordering field is only recorded when it resolves against a schema. `TestOneToTwoUpgradeHandler` runs 9 of 9; with the handler change reverted 6 of them fail. `TestUpgradeDowngradeLegacy` runs 17 with 15 skipped and no failures. The end-to-end cases added to `TestUpgradeDowngradeLegacy` and `TestHoodieSparkSqlWriter` are checked in disabled under the same HUDI-9700 as the rest of the legacy upgrade coverage, since they fail on the version 6 floor before the backfill is reached. ### Documentation Update none ### Contributor's checklist - [x] Read through [contributor's guide](https://hudi.apache.org/contribute/how-to-contribute) - [x] Enough context is provided in the sections above - [x] Adequate tests were added if applicable -- 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]
