fhan688 opened a new pull request, #20144:
URL: https://github.com/apache/hudi/pull/20144
### Describe the issue this Pull Request addresses
`HoodieOptionConfig.makeOptionsCaseInsensitive` uses substring matching to
normalize SQL option names. Consequently, unrelated properties such as `key`,
`field`, and `mode` are incorrectly mapped to `primaryKey`, `orderingFields`,
and `recordMergeMode`.
When a custom property and a recognized option coexist, normalization
produces duplicate keys and can silently overwrite the intended configuration.
For example, `primaryKey=id` and `key=business_tag` both become `primaryKey`.
### Summary and Changelog
- Replace lowercase substring matching with `equalsIgnoreCase` to match
complete option names.
- Preserve case-insensitive handling of recognized options and aliases,
including `preCombineField`.
- Keep unrelated property names and all property values unchanged.
- Add regression tests covering normalization, aliases, and custom
properties coexisting with recognized options.
Validation: `TestHoodieOptionConfig` passed all 7 tests with JDK 11 and
the Spark 3.5 profile. Style checks and `git diff --check` also passed.
### Impact
Custom properties whose names are substrings of recognized SQL options are
preserved instead of being interpreted as Hudi options. No new configuration,
public API, or storage format changes.
### Risk Level
low — The change is limited to option-name matching. Regression tests
verify that recognized options and aliases continue to normalize correctly
while unrelated properties remain intact.
### Documentation Update
none
### Contributor's checklist
- [ ] 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]