Allow empty values within partitioned fragment#14872
Merged
martint merged 1 commit intotrinodb:masterfrom Nov 5, 2022
Merged
Conversation
sopel39
approved these changes
Nov 3, 2022
core/trino-main/src/main/java/io/trino/sql/planner/PlanFragmenter.java
Outdated
Show resolved
Hide resolved
Member
Author
|
@sopel39, added test and comment. |
phd3
reviewed
Nov 3, 2022
core/trino-main/src/main/java/io/trino/sql/planner/PlanFragmenter.java
Outdated
Show resolved
Hide resolved
sopel39
reviewed
Nov 4, 2022
plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestIssue14317.java
Outdated
Show resolved
Hide resolved
c131018 to
7ce7ec0
Compare
sopel39
reviewed
Nov 4, 2022
plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestIssue14317.java
Outdated
Show resolved
Hide resolved
plugin/trino-hive/src/test/java/io/trino/plugin/hive/TestIssue14317.java
Outdated
Show resolved
Hide resolved
577250c to
c327103
Compare
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.
This file contains hidden or 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
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.
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: