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

Allow empty values within partitioned fragment #14872

Merged
merged 1 commit into from
Nov 5, 2022

Conversation

martint
Copy link
Member

@martint martint commented Nov 2, 2022

In some cases, a subplan containing a remote exchange (which results in a partitioned fragment) can be replaced with an empty Values node. In the process, the remote exchange is removed, which leaves the Values node within the downstream partitioned fragment.

The plan fragmenter cannot currently deal with that scenario. It fails with an error indicating the partitioning is already set. However, it is for an empty Values to appear within a partitioned fragment, since there are no issues with rows being "replicated" across multiple fragments.

Release notes

Fixes #14317

(x) Release notes are required, with the following suggested text:

# General
* Fix failure for certain queries involving joins over partitioned tables. ({issue}`14317`)

@cla-bot cla-bot bot added the cla-signed label Nov 2, 2022
@martint martint changed the title Allow empty values withing partitioned fragment Allow empty values within partitioned fragment Nov 2, 2022
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.

is test possible?

@martint
Copy link
Member Author

martint commented Nov 3, 2022

@sopel39, added test and comment.

Copy link
Member

@phd3 phd3 left a comment

Choose a reason for hiding this comment

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

Thanks @martint for the fix and explanation.

@martint martint force-pushed the fix-14317 branch 2 times, most recently from c131018 to 7ce7ec0 Compare November 4, 2022 17:46
@martint martint requested review from sopel39 and phd3 November 4, 2022 17:48
@martint martint force-pushed the fix-14317 branch 2 times, most recently from 577250c to c327103 Compare November 5, 2022 01:41
In some cases, a subplan containing a remote exchange (which results in a
partitioned fragment) can be replaced with an empty Values node. In the
process, the remote exchange is removed, which leaves the Values node
within the downstream partitioned fragment.

The plan fragmenter cannot currently deal with that scenario. It fails
with an error indicating the partitioning is already set. However,
it is for an empty Values to appear within a partitioned fragment,
since there are no issues with rows being "replicated" across
multiple fragments.
@martint martint merged commit 8024d30 into trinodb:master Nov 5, 2022
@github-actions github-actions bot added this to the 403 milestone Nov 5, 2022
@martint martint deleted the fix-14317 branch November 7, 2022 17:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants