u70b3 opened a new pull request, #17028:
URL: https://github.com/apache/iceberg/pull/17028

   ## Summary
   
   This PR brings the stricter equality delete field ID validation recently 
added in [iceberg-rust#2723](https://github.com/apache/iceberg-rust/pull/2723) 
into the Java SDK.
   
   The current Java reference implementation only guards against null/empty 
equality field ID lists. This change additionally rejects:
   
   - Duplicate equality field IDs
   - Equality field IDs that do not exist in the table schema
   
   Catching these invalid configurations early produces clearer errors and 
avoids generating meaningless delete files.
   
   ## Changes
   
   - Added `EqualityDeleteWriter.validateEqualityFieldIds(int[] 
equalityFieldIds, Schema schema)` to centralize the validation logic.
   - Applied the validation in writer factory constructors:
     - `GenericAppenderFactory`
     - `RegistryBasedFileWriterFactory` (covers `GenericFileWriterFactory`, 
Flink, Spark subclasses)
     - `BaseFileWriterFactory` (deprecated, kept for consistency)
   - Added unit tests for empty, duplicate, and missing equality field IDs.
   
   ## Testing
   
   - `./gradlew :iceberg-core:test --tests "org.apache.iceberg.deletes.*"`
   - `./gradlew :iceberg-data:test`
   - `./gradlew :iceberg-core:spotlessCheck :iceberg-data:spotlessCheck`
   - `./gradlew :iceberg-flink:iceberg-flink-2.1:compileJava 
:iceberg-spark:iceberg-spark-4.1_2.13:compileJava`
   
   All passed.
   
   🤖 Generated with [Claude Code](https://claude.com/code)


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

Reply via email to