Indian-boult opened a new pull request, #1027:
URL: https://github.com/apache/incubator-xtable/pull/1027

   Fixes #1026
   
   ## What is the purpose of the pull request
   
   When an Iceberg source table has position deletes, equality deletes or 
deletion vectors, XTable synced its data files as if every row were still live. 
The Delta and Hudi targets kept returning the deleted rows, and every sync 
reported SUCCESS. With this change the sync fails instead, the same way #938 
handles Delta deletion vectors.
   
   ## Brief change log
   
   - A full sync fails when delete files apply to any data file of the current 
snapshot. `planFiles` already joins the delete manifests, so the check reads 
nothing extra.
   - An incremental sync fails on a commit that adds delete files. 
`Snapshot.addedDeleteFiles` reads only the delete manifests written by that 
commit, so commits without deletes cost nothing extra. `getCommitsBacklog` is 
unchanged, in line with the review on #938.
   - Delete files that no longer apply, such as the ones left behind after 
compaction rewrote their data files, do not fail the sync, because the check 
uses the scan and not the `total-delete-files` summary.
   - New `IcebergConversionSourceConfig` with 
`xtable.iceberg.source.allow_unsupported_delete_files`. When it is `true`, one 
warning is logged per source instance and later matches go to DEBUG.
   - `features-and-limitations.md` gains an Iceberg section with the behavior, 
the rebuild note for targets synced by earlier releases, and the recovery steps.
   
   The CLI has no way to pass source properties yet, so the override is 
reachable through `SourceTable.additionalProperties` only. #938 adds YAML 
plumbing for its Delta flag, and I would add the Iceberg flag the same way once 
that lands, to keep the two PRs from conflicting.
   
   ## Verify this pull request
   
   This change added tests and can be verified as follows:
   
   - `TestIcebergConversionSourceDeleteFiles` builds real Iceberg tables and 
covers position deletes, equality deletes and v3 deletion vectors for both full 
and incremental sync, a commit that adds data and equality deletes together, 
delete files that no longer apply after a rewrite, and the override. 7 of its 
11 cases fail on main.
   - `TestIcebergConversionSourceConfig` covers parsing of the property.
   - `ITConversionController#testIcebergSourceWithPositionDeletesFailsSync` 
syncs an Iceberg table to Delta and Hudi in both sync modes, adds position 
delete files and checks that the sync fails. It then rewrites the data files 
with the deletes applied, runs a full sync and checks that both targets match 
the source at 40 rows. On main the sync after the delete succeeds and the test 
fails.
   - `mvn -pl xtable-core -am verify` passes locally on JDK 11, with 599 unit 
tests and 224 integration tests in xtable-core, including all 82 in 
`ITConversionController`.
   


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