turboFei opened a new pull request, #16520: URL: https://github.com/apache/iceberg/pull/16520
## Background #11478 changed the effective default delete granularity to `FILE` for Spark writes, but introduced two inconsistencies: 1. `TableProperties.DELETE_GRANULARITY_DEFAULT` was left pointing to `DeleteGranularity.PARTITION`, making the constant misleading and effectively dead code. 2. All three Spark versions (`v3.5`, `v4.0`, `v4.1`) hardcoded `DeleteGranularity.FILE` directly in `SparkWriteConf` instead of referencing the constant. ## Changes - Fix `TableProperties.DELETE_GRANULARITY_DEFAULT` to `DeleteGranularity.FILE` to correctly reflect the intended default - Use `TableProperties.DELETE_GRANULARITY_DEFAULT` in `SparkWriteConf` for Spark v3.5, v4.0, and v4.1 to establish a single source of truth ## Test Plan - [ ] Existing unit tests for `SparkWriteConf` cover the default value resolution path - [ ] No behavior change — the effective default (`FILE`) remains the same; this only removes the inconsistency between the constant and its usage Followup to #11478 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
