hudi-agent commented on code in PR #18437:
URL: https://github.com/apache/hudi/pull/18437#discussion_r3267023695


##########
hudi-spark-datasource/hudi-spark/src/main/java/org/apache/hudi/cli/ArchiveExecutorUtils.java:
##########


Review Comment:
   🤖 **Line 58:** I think this ordering has a subtle issue that's causing the 
`Test Call archive_commits Procedure with options` test to fail in CI 
(`Expected 2, but got 6`). `archiveCommitsWith(minCommits, maxCommits)` calls 
`setValue` unconditionally, and then `build()` invokes `setDefaults` to fill in 
every other archival ConfigProperty. `withArchivalConfig` then does 
`putAll(archivalConfig.getProps())` onto `writeConfig.getProps()`, which 
overwrites every archival-related key the user already supplied via 
`withProps(conf)` — including `hoodie.keep.min.commits`, 
`hoodie.keep.max.commits`, and `hoodie.commits.archival.batch`. The same 
overwrite happens for `withCleanConfig` (e.g. 
`hoodie.cleaner.commits.retained`) and `withMetadataConfig` (e.g. 
`hoodie.metadata.enable`). So when a user passes only `options => 
'hoodie.keep.min.commits=2,...'` without naming `min_commits`, the procedure's 
default `min_commits=20` still wins and no archival happens. Could the Scala 
procedure inst
 ead check `isArgDefined` for each named param and only inject those explicit 
values into `confs` (so options-only callers work, and explicit named params 
still win over options)?
   
   <sub><i>- AI-generated; verify before applying. React 👍/👎 to flag 
quality.</i></sub>



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