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

feat: allow physical plan attributes to contribute to formatter details #4949

Merged
merged 1 commit into from
Jul 1, 2022

Conversation

adrian-thurston
Copy link
Contributor

In order to determine if a query plan has been parallelized, we have been using
the presence of a partitionMerge node in the plan. With the emergence of a new
technique of merging in aggregateWindow nodes, and possibly soon pivot nodes as
well, we can no longer use this test.

This PR allows physical plan attributes to contribute to plan details. First
the spec is consulted, then any physical attributes that are present. Any node
with the ParallelMerge attribute can then indicate it is a merge node.

Done checklist

  • docs/SPEC.md updated
  • Test cases written

@adrian-thurston adrian-thurston requested a review from a team as a code owner June 30, 2022 19:03
@adrian-thurston adrian-thurston requested review from onelson and removed request for a team June 30, 2022 19:03
@adrian-thurston adrian-thurston force-pushed the feat/physical-attribute-plan-details branch from 9d82d4c to 1f7d0bd Compare June 30, 2022 19:12
In order to determine if a query plan has been parallelized we have been using
the presence of a partitionMerge node in the plan. With the emergence of a new
technique of merging in aggregateWindow nodes, and possibly soon pivot nodes as
well, we can no longer use this test.

This PR allows physical plan attributes to contribute to plan details. First
the spec is consulted, then any physical attributes that are present. Any node
with the parallel merge attribute can then indicate it is a merge node.
Copy link
Contributor

@onelson onelson left a comment

Choose a reason for hiding this comment

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

LGTM.

For my curiosity: I thought the formatter was mostly for diagnostic purposes (ie, println the plan while working on changes to verify the WIP). Does this output get consumed by something other than human eyeballs?

@MaduMitha-Ravi MaduMitha-Ravi merged commit 4e5e59a into master Jul 1, 2022
@Marwes Marwes deleted the feat/physical-attribute-plan-details branch July 4, 2022 08:38
@wolffcm
Copy link

wolffcm commented Jul 6, 2022

@onelson I saw you asked this question and it never got answered. We put the plan into the profile if queryprofiling is turned on, so end users will see it as well. As far as I know nothing consumes it programatically.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants