Repository navigation
Conversation
…delete files, which tasks never read - IcebergSplit.write drops the column stats of delete files that are not file-scoped - Test: a split round trip drops multi-file delete stats, keeps file-scoped and DV references and data file stats
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



What changes were proposed in this pull request?
IcebergSplit.writeserializes the delete files that are not file-scoped without their column stats(
DeleteFile.copyWithoutStats()). A file-scoped position delete is written unchanged: its file_path bounds name thedata file it belongs to (
ContentFileUtil.referencedDataFile). A deletion vector is written unchanged too.Why are the changes needed?
Every split carries the delete files of its data files with their column stats. Iceberg's planner already reduces
them to the stats of the file_path column, but a task reads none of them: delete readers apply the deletes without
looking at stats, and the only task-side use is
ContentFileUtil.referencedDataFilefor file-scoped deletes, whichthis change keeps. For multi-file (for example partition-scoped) position deletes and equality deletes, the stats
are a third to two thirds of the serialized bytes and about two thirds of the serialization time.
Measured locally per split (4,000 splits of a table with partition-scoped V2 position deletes, 300-320 deletes per
split, Java serialization plus the Snappy compression of HIVE-30271, single thread, copies of the deletes included):
Tables whose deletes are all file-scoped position deletes or deletion vectors serialize the same bytes as before.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
TestIcebergSplit: a split round trip drops the stats of a multi-file position delete and keeps a file-scopeddelete's referenced data file, a DV's referenced data file and content range, and the data file's stats.
TestInputFormatReaderDeletes,TestIcebergInputFormats,TestHiveIcebergCRUD,TestHiveIcebergDeletionVectorsand
TestHiveIcebergTimeTravelpass.