LuciferYang opened a new pull request, #11377:
URL: https://github.com/apache/paimon/pull/11377

   ### Purpose
   
   Fixes #11376. On Spark 4.2 and 4.3, a DELETE whose condition covers only 
partition columns stayed the copy-on-write `ReplaceData` (or, for an 
unaware-bucket deletion-vector append table, the `WriteDelta`) that Spark 
rewrites it into, instead of Paimon's metadata-only truncate. On Spark 4.1 
`Spark41DeleteMetadataRestore` turns that plan back into 
`DeleteFromPaimonTableCommand`, but the spark42 and spark43 builds exclude it, 
and `Spark42RowLevelCommandRewrite` handled only UPDATE and MERGE.
   
   The restore moves into a `MetadataOnlyDeleteRestore` trait in 
`paimon-spark4-common`. `Spark41DeleteMetadataRestore` uses it unchanged, and 
`Spark42RowLevelCommandRewrite`, which the 4.3 module also compiles, applies it 
before its UPDATE and MERGE cases.
   
   ### Tests
   
   The Spark 4.2 module, whose test sources the 4.3 module also compiles, now 
runs the shared `PaimonOptimizationTestBase`, `DeleteFromTableTestBase` and 
`DeltaRowLevelOpsTest`. Without the restore, the metadata-only DELETE tests of 
`PaimonOptimizationTestBase` and the partitioned DELETE of 
`DeltaRowLevelOpsTest` fail on Spark 4.2. `DeltaRowLevelOpsTest` also checks 
that the restored deletion-vector DELETE is planned as a truncate.
   


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