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

   ### Describe the issue this Pull Request addresses
   
   The current `archive_commits` stored procedure only supports fixed 
parameters (min_commits, max_commits, retain_commits, enable_metadata), which 
cannot meet users' needs for custom Hudi configurations. Users need to pass 
additional Hudi configuration options (such as `hoodie.keep.min.commits`, 
`hoodie.keep.max.commits`, etc.) to control archiving behavior.
   
   ### Summary and Changelog
   
   Add support for the `options` parameter to the `archive_commits` stored 
procedure, allowing users to pass additional Hudi configuration options in the 
format key=value,key2=value2.
   
   ArchiveExecutorUtils.java: Added a Map<String, String> conf parameter to 
pass to HoodieWriteConfig
   
   ArchiveCommitsProcedure.scala: Added an optional parameter options (String 
type), parsed and converted to a Map
   
   TestArchiveCommitsProcedure.scala: Added test cases to verify the options 
parameter functionality
   
   Usage:
   
   CALL archive_commits(table => 'table', retain_commits => 1,
   
   options => 'hoodie.keep.min.commits = 2, hoodie.keep.max.commits=3')
   
   
   ### Impact
   
   Added an optional parameter options, without changing the default behavior 
of the existing API, enhancing the configurability of stored procedures
   
   ### Risk Level
   
   low - Only added optional parameters, without affecting existing 
functionality
   
   ### Documentation Update
   
   None
   
   ### Contributor's checklist
   
   - [ ] Read through [contributor's 
guide](https://hudi.apache.org/contribute/how-to-contribute)
   - [ ] Enough context is provided in the sections above
   - [ ] 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