Skip to content
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

Skip null checks for positions from blocks that have no nulls in aggr… #14567

Merged
merged 1 commit into from
Nov 15, 2022

Conversation

radek-kondziolka
Copy link
Contributor

@radek-kondziolka radek-kondziolka commented Oct 11, 2022

Using io.trino.spi.block.Block.mayHaveNull it can be detected that there are no null positions in the block. Basing on that we skip checking nullability of every postition for such blocks in the aggregation input method for performance reason.

Performance results (cpu time, parquet, unpart, sf1000)
tpch: -1.77% (average for two runs)
tpcds: -1.61% (average for two runs)

For queries where aggregation is a significant operator there is more gain, like 4-5% cpu time gain, for example:
q06,q12 in tpch and q09 / q28 in tpcds
full report:
serial benchmarks.pdf

(* ) This is not user-visible or 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:
(*) Release note is optional: Improved performance for aggregation

@cla-bot cla-bot bot added the cla-signed label Oct 11, 2022
@radek-kondziolka radek-kondziolka marked this pull request as ready for review October 11, 2022 16:42
@sopel39 sopel39 requested a review from dain October 11, 2022 16:54
Copy link
Member

@lukasz-stec lukasz-stec left a comment

Choose a reason for hiding this comment

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

lgtm % comments

Copy link
Member

@sopel39 sopel39 left a comment

Choose a reason for hiding this comment

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

lgtm % comments

@radek-kondziolka radek-kondziolka force-pushed the rk/may_have_null_acc branch 2 times, most recently from 3301353 to c51f373 Compare November 4, 2022 13:52
Using io.trino.spi.block.Block.mayHaveNull it can be detected that
there are no null positions in the block. Basing on that we skip
checking nullability of every postition for such blocks in the
aggregation `input` method for performance reason.
@sopel39 sopel39 merged commit daff2eb into trinodb:master Nov 15, 2022
@sopel39 sopel39 mentioned this pull request Nov 15, 2022
@github-actions github-actions bot added this to the 403 milestone Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

3 participants