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

   ### Describe the issue this Pull Request addresses
   
   This PR adds support for creating Hudi tables without a primary key in 
Flink's HoodiePipeline API.
   
   Issue: [HUDI-6238](https://issues.apache.org/jira/browse/HUDI-6238)
   
   ### Summary and Changelog
   
   **Summary**: Users can now create Hudi tables using HoodiePipeline.Builder 
without specifying a primary key, enabling non-primary-key table use cases.
   
   **Changelog**:
   - Modified `getCreateHoodieTableDDL()` in `HoodiePipeline.java` to 
conditionally add the PRIMARY KEY clause only when `pkField` is not null
   - Updated `testHoodiePipelineBuilderSink()` test to be parameterized, 
testing both with and without primary key scenarios
   
   ### Impact
   
   - **Public API change**: The `HoodiePipeline.Builder.pk()` method is now 
optional instead of effectively required
   - No breaking changes - existing code that specifies a primary key will 
continue to work
   
   ### Risk Level
   
   Low - The change is additive and backward compatible. Existing functionality 
is preserved when a primary key is specified.
   
   ### Documentation Update
   
   None - This is an enhancement to existing API behavior that makes the `pk()` 
method optional.
   
   ### 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]

Reply via email to