Indian-boult opened a new issue, #1023: URL: https://github.com/apache/incubator-xtable/issues/1023
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-xtable/issues?q=is%3Aissue) and found no similar issues. ### Please describe the bug 🐞 `DeltaKernelDataFileUpdatesExtractor` writes every `RemoveFile` with `dataChange=false`. On a snapshot sync it also passes `snapshot.getVersion()` as the deletion timestamp, which Delta reads as millis since epoch, so the remove is dated in 1970. The Delta Standalone target writes `dataChange=true` and the current time. This has two effects on Delta readers: 1. Delta streaming ignores removes with `dataChange=false`. After an update or delete in the source, a stream from the Kernel target emits the rewritten file as new rows, with no error, even with `skipChangeCommits=true`. 2. VACUUM treats the 1970 remove as past the retention period. A default VACUUM right after a snapshot sync deletes the removed files, and time travel to the previous version fails. To reproduce, with Spark 3.4.2 and Delta 2.4.0: 1. Create an Iceberg table with rows `(1, 'a')` and `(2, 'b')`. Sync it to Delta at the Iceberg data directory with `xtable.delta.target.use_kernel=true`. 2. Run `INSERT OVERWRITE ... VALUES (2, 'b')` and sync again. 3. Stream the Delta table from version 0: the result is `[1, 2, 2]` with no error. The Standalone target fails with `Detected a data update`, or returns `[1, 2]` with `skipChangeCommits=true`. 4. Repeat steps 1 and 2 with `SyncMode.FULL`. The remove in version 1 has `"deletionTimestamp":0`. Set the old data file's modification time to 8 days ago and run `VACUUM` with the default retention. The file is deleted, and reading `versionAsOf=0` fails with `FileNotFoundException`. On the Standalone target the file is kept. Expected behavior: the Kernel target writes removes with `dataChange=true` and the current time, as the Standalone target does. ### Are you willing to submit PR? - [X] I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- 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]
