Anurag-S1ngh opened a new pull request, #19290:
URL: https://github.com/apache/iceberg/pull/19290

   ## Summary
   
   - Spark accepts `ADD PARTITION FIELD ... AS K` and `... AS k`, producing a 
spec with partition field names that differ only in case. With Spark's default 
case-insensitive resolution, every read of the table then fails.
   - Reject an alias that matches an existing partition field name ignoring 
case, before the update is applied.
   
   ## Changes
   
   - `AddPartitionFieldExec` in Spark 3.5, 4.0, 4.1, and 4.2: when an alias is 
given, check the existing partition field names with `equalsIgnoreCase` and 
fail with a clear message.
   - Add a Spark 4.2 test for the reported sequence.
   
   ## Testing
   
   - `./gradlew ":iceberg-spark:iceberg-spark-extensions-4.2_2.13:test" --tests 
"org.apache.iceberg.spark.extensions.TestAlterTablePartitionFields"` passes.
   - The new test fails before the change with `Expecting code to raise a 
throwable`.
   - `spotlessApply` run for Spark 4.2 extensions.
   - Spark 3.5, 4.0, and 4.1 are not enabled in this checkout; their extension 
files are identical.
   
   Closes #19284
   


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