Skip to content

Skip Iceberg row filter when not needed#11851

Merged
findepi merged 1 commit intotrinodb:masterfrom
alexjo2144:iceberg/row-level-deletes-read
Apr 15, 2022
Merged

Skip Iceberg row filter when not needed#11851
findepi merged 1 commit intotrinodb:masterfrom
alexjo2144:iceberg/row-level-deletes-read

Conversation

@alexjo2144
Copy link
Copy Markdown
Member

Description

Avoid recreating Iceberg Pages for the DeleteFilter when not needed.

Is this change a fix, improvement, new feature, refactoring, or other?

Improvement/Fix

Is this a change to the core query engine, a connector, client library, or the SPI interfaces? (be specific)

Iceberg Connector

How would you describe this change to a non-technical end user or system administrator?

Small performance improvement

Related issues, pull requests, and links

#11642

Documentation

(x) No documentation is needed.
( ) Sufficient documentation is included in this PR.
( ) Documentation PR is available with #prnumber.
( ) Documentation issue #issuenumber is filed, and can be handled later.

Release notes

(x) No release notes entries required.
( ) Release notes entries required with the following suggested text:

@cla-bot cla-bot bot added the cla-signed label Apr 7, 2022
@alexjo2144 alexjo2144 requested review from findepi and findinpath April 7, 2022 15:55
@alexjo2144 alexjo2144 force-pushed the iceberg/row-level-deletes-read branch from 60e3363 to 7773c9d Compare April 8, 2022 13:57
@alexjo2144
Copy link
Copy Markdown
Member Author

Updated to use Optional.filter. Thanks for reviewing

@alexjo2144
Copy link
Copy Markdown
Member Author

@electrum can we merge this when you get a chance?

dataPageSource.get(),
projectionsAdapter,
deleteFilter);
Optional.of(deleteFilter).filter(filter -> filter.hasPosDeletes() || filter.hasEqDeletes()));
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it needed?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The data Page is always rewritten in the IcebergPageSource right now, this makes it conditional on if there are actually any deletes to account for.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry for not being clear. I understand what the change is for.
wonder why Optional#filter is needed here.
if "deleteFilter" is not needed, why was it passed until here? did the split source attach some useless information to the split?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I see. We could also make this conditional on split.getDeletes().isEmpty() if that's clearer? They're equivalent

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why was it passed until here?

The DeleteFilter is constructed on the line right above this, the only thing passed around until here are some empty lists. split.getDeletes() should be empty, as should deleteFilterRequiredSchema

@findepi findepi merged commit 0a220a3 into trinodb:master Apr 15, 2022
@findepi findepi added the no-release-notes This pull request does not require release notes entry label Apr 15, 2022
@alexjo2144 alexjo2144 deleted the iceberg/row-level-deletes-read branch April 15, 2022 15:07
@github-actions github-actions bot added this to the 378 milestone Apr 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed no-release-notes This pull request does not require release notes entry

Development

Successfully merging this pull request may close these issues.

4 participants