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

Use gather over partitioned exchange for small join build side #12257

Merged

Conversation

lukasz-stec
Copy link
Member

@lukasz-stec lukasz-stec commented May 5, 2022

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
image

use-gather-on-small-build-rule-part.pdf

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

improvement

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

core query engine, planner

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

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:

# Section
* Fix some things. ({issue}`issuenumber`)

@cla-bot cla-bot bot added the cla-signed label May 5, 2022
@lukasz-stec lukasz-stec force-pushed the ls/016-use-gather-for-small-build branch 5 times, most recently from 59096f2 to 9f5b89a Compare May 7, 2022 22:22
@lukasz-stec lukasz-stec marked this pull request as ready for review May 8, 2022 09:54
@lukasz-stec lukasz-stec requested a review from sopel39 May 8, 2022 09:54
@lukasz-stec lukasz-stec force-pushed the ls/016-use-gather-for-small-build branch from 9f5b89a to bd27013 Compare May 16, 2022 12:52
@lukasz-stec
Copy link
Member Author

javadoc + comment updated

Copy link
Member

@raunaqmorarka raunaqmorarka left a 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

@lukasz-stec lukasz-stec force-pushed the ls/016-use-gather-for-small-build branch from bd27013 to a1544f7 Compare May 17, 2022 07:29
Copy link
Member Author

@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.

comments addressed

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.

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) {
Copy link
Member

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

Copy link
Member Author

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.

@raunaqmorarka
Copy link
Member

let's also document the config in properties-optimizer.rst

@lukasz-stec lukasz-stec force-pushed the ls/016-use-gather-for-small-build branch from a1544f7 to ffabb9d Compare May 17, 2022 14:00
@github-actions github-actions bot added the docs label May 17, 2022
Copy link
Member Author

@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.

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) {
Copy link
Member Author

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.
@lukasz-stec lukasz-stec force-pushed the ls/016-use-gather-for-small-build branch from ffabb9d to 08f8059 Compare May 18, 2022 08:57
@lukasz-stec
Copy link
Member Author

documentation updated

@sopel39
Copy link
Member

sopel39 commented May 18, 2022

Failed due to #12413

@sopel39 sopel39 merged commit c92ea3b into trinodb:master May 18, 2022
@sopel39 sopel39 mentioned this pull request May 18, 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