deniskuzZ opened a new pull request, #6975:
URL: https://github.com/apache/hive/pull/6975
### What changes were proposed in this pull request?
`IcebergSplit.write` serializes 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 the
data 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.referencedDataFile` for file-scoped deletes, which
this 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):
| deletes | serialization, before / after | Java bytes, before / after |
Snappy bytes, before / after |
|---|---|---|---|
| without file_path bounds | 737 / 244 us | 172.5 / 116.2 KB | 18.4 / 12.7
KB |
| with file_path range bounds | 778 / 240 us | 316.0 / 109.3 KB | 26.1 /
12.1 KB |
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-scoped
delete's referenced data file, a DV's referenced data file and content
range, and the data file's stats.
- `TestInputFormatReaderDeletes`, `TestIcebergInputFormats`,
`TestHiveIcebergCRUD`, `TestHiveIcebergDeletionVectors`
and `TestHiveIcebergTimeTravel` pass.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]