-
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
Use gather over partitioned exchange for small join build side #12257
Use gather over partitioned exchange for small join build side #12257
Conversation
59096f2
to
9f5b89a
Compare
core/trino-main/src/main/java/io/trino/sql/planner/PlanOptimizers.java
Outdated
Show resolved
Hide resolved
...ain/src/main/java/io/trino/sql/planner/iterative/rule/UseNonPartitionedJoinLookupSource.java
Outdated
Show resolved
Hide resolved
...ain/src/main/java/io/trino/sql/planner/iterative/rule/UseNonPartitionedJoinLookupSource.java
Outdated
Show resolved
Hide resolved
9f5b89a
to
bd27013
Compare
javadoc + comment updated |
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.
Please share benchmark results as well
core/trino-main/src/main/java/io/trino/sql/planner/OptimizerConfig.java
Outdated
Show resolved
Hide resolved
...ain/src/main/java/io/trino/sql/planner/iterative/rule/UseNonPartitionedJoinLookupSource.java
Show resolved
Hide resolved
...src/test/java/io/trino/sql/planner/iterative/rule/TestUseNonPartitionedJoinLookupSource.java
Show resolved
Hide resolved
core/trino-main/src/test/java/io/trino/sql/planner/optimizations/TestAddExchangesPlans.java
Outdated
Show resolved
Hide resolved
bd27013
to
a1544f7
Compare
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.
comments addressed
...ain/src/main/java/io/trino/sql/planner/iterative/rule/UseNonPartitionedJoinLookupSource.java
Show resolved
Hide resolved
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.
comment
@@ -1198,6 +1205,17 @@ private static Integer validateIntegerValue(Object value, String property, int l | |||
return intValue; | |||
} | |||
|
|||
private static void validateNonNegativeLongValue(Long value, String property) | |||
{ | |||
if (value == null) { |
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.
I don't think you can set null session property
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.
I think you're right, i dropped the null check. Interestingly there are a lot of null checks in this class in other places.
let's also document the config in |
a1544f7
to
ffabb9d
Compare
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.
null check dropped.
Added doc to properties-optimizer.rst
@mosabua @raunaqmorarka @sopel39 PTAL
@@ -1198,6 +1205,17 @@ private static Integer validateIntegerValue(Object value, String property, int l | |||
return intValue; | |||
} | |||
|
|||
private static void validateNonNegativeLongValue(Long value, String property) | |||
{ | |||
if (value == null) { |
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.
I think you're right, i dropped the null check. Interestingly there are a lot of null checks in this class in other places.
Not partitioned lookup source has better performance than partitioned one so for small build side the overall join performance is better even if the lookup source is created using a single thread.
ffabb9d
to
08f8059
Compare
documentation updated |
Failed due to #12413 |
Description
Not partitioned lookup source has better performance
than partitioned one so for small build side the overall
join performance is better even if the lookup source is
created using a single thread.
Benchmarks
orc sf1000 part
~6% gain for tpcds, tpch no diff
use-gather-on-small-build-rule-part.pdf
improvement
core query engine, planner
Improve join performance for some subset of queries
Related issues, pull requests, and links
Documentation
( ) 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
( ) No release notes entries required.
( ) Release notes entries required with the following suggested text: