-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Conversation
This file contains 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
lukasz-stec
approved these changes
Oct 12, 2022
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.
lgtm % comments
core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorCompiler.java
Outdated
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorCompiler.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorCompiler.java
Show resolved
Hide resolved
radek-kondziolka
force-pushed
the
rk/may_have_null_acc
branch
from
October 24, 2022 10:26
1ca3bfb
to
c6834ef
Compare
sopel39
reviewed
Oct 26, 2022
core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorCompiler.java
Show resolved
Hide resolved
sopel39
reviewed
Nov 3, 2022
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.
lgtm % comments
core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorCompiler.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorCompiler.java
Show resolved
Hide resolved
core/trino-main/src/main/java/io/trino/operator/aggregation/AccumulatorCompiler.java
Show resolved
Hide resolved
radek-kondziolka
force-pushed
the
rk/may_have_null_acc
branch
2 times, most recently
from
November 4, 2022 13:52
3301353
to
c51f373
Compare
radek-kondziolka
force-pushed
the
rk/may_have_null_acc
branch
from
November 7, 2022 07:18
c51f373
to
19ae17b
Compare
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.
radek-kondziolka
force-pushed
the
rk/may_have_null_acc
branch
from
November 7, 2022 09:22
19ae17b
to
81b746d
Compare
sopel39
approved these changes
Nov 15, 2022
Closed
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.
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 aggregationinput
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