ump45nose opened a new pull request, #20484:
URL: https://github.com/apache/hudi/pull/20484

   ### Describe the issue this Pull Request addresses
   
   Closes #15404
   
   On non-partitioned Flink tables, `HoodieTableFactory.setupHoodieKeyOptions` 
always overwrote `hoodie.datasource.write.keygenerator.class` with 
`NonpartitionedAvroKeyGenerator`, so an explicit `KEYGEN_CLASS_NAME` was 
ignored. Collaborator triage confirmed this is still present on master (closed 
unmerged #6567).
   
   ### Summary and Changelog
   
   - Guard the non-partitioned keygen auto-tweak with 
`StringUtils.isNullOrEmpty(KEYGEN_CLASS_NAME)`, matching the pattern already 
used in `setupTimestampKeygenOptions`.
   - Add regression coverage in `TestHoodieTableFactory` (source and sink) that 
a configured dummy key generator is kept when the partition path is empty.
   
   ### Impact
   
   User-facing for Flink non-partitioned tables that set `KEYGEN_CLASS_NAME`: 
the configured class is now respected instead of being replaced. No public API 
change.
   
   ### Risk Level
   
   low — one-line guard plus unit tests on the existing options setup path; 
default behavior when `KEYGEN_CLASS_NAME` is unset is unchanged.
   
   ### 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
   
   ### AI assistance
   
   AI-assisted implementation and tests; change reviewed and verified locally 
(`TestHoodieTableFactory#testSetupHoodieKeyOptionsForSource` / `ForSink`).
   


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