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

   ## Summary
   
   - `rewrite_position_delete_files` filtered the data-files metadata table 
using the delete file's own spec partition type and raw partition. After a 
partition field is renamed and its old name is reused, the metadata table's 
unified partition type names the fields differently, so the filter matched no 
live data files. The left-semi join then dropped the deletes, and deleted rows 
came back.
   - Coerce the delete file's partition into the table's unified partition type 
and filter data files with that, so values match by partition field ID.
   
   ## Changes
   
   - `SparkRewritePositionDeleteRunner` in Spark 3.5, 4.0, 4.1, and 4.2: use 
`Partitioning.partitionType(table())` and `PartitionUtil.coercePartition` for 
the data-files filter.
   - Add a Spark 4.2 test that renames identity `p` to `p_old`, adds 
`truncate(p)` as `p`, rewrites the deletes, and asserts the deleted rows stay 
deleted.
   
   ## Testing
   
   - `./gradlew ":iceberg-spark:iceberg-spark-4.2_2.13:test" --tests 
"org.apache.iceberg.spark.actions.TestRewritePositionDeleteFilesAction"` passes.
   - The new test fails before the change with rows 1 and 2 returning.
   - `spotlessApply` run for Spark 4.2.
   - Spark 3.5, 4.0, and 4.1 are not enabled in this checkout; the changed 
runner block is identical across versions.
   
   Closes #19286
   


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