-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove unused bounds data from Iceberg DeleteFiles #22688
Remove unused bounds data from Iceberg DeleteFiles #22688
Conversation
8a3a572
to
3f27072
Compare
PTAL at test failures |
https://github.com/trinodb/trino/actions/runs/9962214866/job/27526300884?pr=22688
|
128631a
to
75d65dd
Compare
Map<Integer, byte[]> upperBounds = firstNonNull(deleteFile.upperBounds(), ImmutableMap.<Integer, ByteBuffer>of()) | ||
.entrySet().stream().collect(toImmutableMap(Map.Entry::getKey, entry -> getWrappedBytes(entry.getValue()).clone())); | ||
Optional<Long> rowPositionLowerBound = Optional.ofNullable(deleteFile.lowerBounds()) | ||
.map(bounds -> bounds.get(DELETE_FILE_POS.fieldId())) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to filter out nulls here ?
i'm not sure that having bounds for DELETE_FILE_POS field is always guaranteed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, better safe than sorry. Don't want to end up with an Optional.of(null) value
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually I was wrong about that, if bounds doesn't have an entry for the DELETE_FILE_POS column it'll return null. Optional.map converts null returns to empty
75d65dd
to
d4a42c5
Compare
d4a42c5
to
45a3388
Compare
Description
DeleteFile is sent to workers so they are data size sensitive.
Additional context and related issues
Release notes
(x) This is not user-visible or is docs only, and no release notes are required.
( ) Release notes are required. Please propose a release note for me.
( ) Release notes are required, with the following suggested text: