Indian-boult opened a new pull request, #1025: URL: https://github.com/apache/incubator-xtable/pull/1025
Fixes #1023 ## What is the purpose of the pull request The Delta Kernel target wrote remove actions with `dataChange=false`, and on a snapshot sync it used the table version as the deletion timestamp. Delta streams ignored the removes and emitted duplicate rows, and VACUUM deleted removed files at once. This PR writes removes the way the Delta Standalone target does. Part of the work before Kernel becomes the default Delta target (#886). ## Brief change log - `DeltaKernelDataFileUpdatesExtractor`: `applySnapshot` and `applyDiff` write removes with `dataChange=true` and let Kernel set the deletion timestamp to the current time. - `TestDeltaKernelDataFileUpdatesExtractor#testRemoveActionsAreDataChangesWithCurrentDeletionTimestamp`: checks both fields for both remove paths. It uses only Delta Kernel and the internal model. ## Verify this pull request This change added tests and can be verified as follows: - The new test fails on `main` (`Remove should be a data change ==> expected: <true> but was: <false>`). With only `dataChange` fixed, it fails on the snapshot remove (`Deletion timestamp should be the sync time, was 0`). It passes with the fix. - `./mvnw -pl xtable-core test`: 582 tests, 0 failures, 0 errors, 3 skipped. - `ITConversionController#testVariousOperationsDeltaKernelTarget`, which syncs updates and deletes to the Kernel target: 4 tests, 0 failures. - Manually verified with Spark 3.4.2 and Delta 2.4.0: a stream over an overwrite commit and a default VACUUM after a snapshot sync now behave the same on the Kernel and Standalone targets. Removes already in the Delta log keep their old values. -- 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]
