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.
This PR fixes 2 non critical but annoying issues in multi-stage:
Issue 1
Plans from different servers were not correctly merged when segments for each server produced different plans. For example, in colocated join, the following query:
Produced:
While with these changes both alternatives are merged, producing the following explain:
Which is easier to read.
The
repeatedattribute has also been removed because it doesn't seem necessary anymore and in fact its meaning wasn't clear once different plans from different segments were merged in aStreamingCombineSelectIssue 2
There was an error in how IDEMPOTENT and IGNORABLE attributes were merged, which ended up randomly including the
segmentattributeSelectStreaming. The expected behavior is that this attribute should only appear if there is a single plan for that segment. Before this fix, the attribute was removed when merging 2 plans with that attribute and different value, but was kept when merging a plan without the attribute with another with the attribute.