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

sql: add missing specs to plan diagrams #76748

Merged
merged 1 commit into from
Feb 19, 2022

Conversation

rharding6373
Copy link
Collaborator

@rharding6373 rharding6373 commented Feb 17, 2022

This change allows missing specs (e.g., RestoreDataSpec and
SplitAndScatterSpec) to be shown in plan diagrams. Before this change a
plan involving these types would result in an error generating the
diagrams. Also added a test to make sure future specs implement the
diagramCellType interface, which is required to generate diagrams.

Release note: None

@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator Author

@rharding6373 rharding6373 left a comment

Choose a reason for hiding this comment

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

Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

:lgtm:

Although I wonder whether we should add a test that verifies somehow that whenever a new processor is introduced, its spec implements diagramCellType interface. If I'm not mistaken, at the moment (before your change) we have 29 implementations for 33 processors, so it leaves two more processors without the proper implementation which would crash the server whenever EXPLAIN (DISTSQL) is executed on a query with those two processors.

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rharding6373)

Copy link
Collaborator Author

@rharding6373 rharding6373 left a comment

Choose a reason for hiding this comment

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

That's a good point. Added the rest of the missing specs and a compliance test. PTAL.

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @yuzefovich)

@rharding6373 rharding6373 changed the title sql: add RestoreDataSpec and SplitAndScatterSpec to plan diagrams sql: add missing specs to plan diagrams Feb 18, 2022
Copy link
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

Nice! :lgtm:

Reviewed 2 of 2 files at r2, all commit messages.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @rharding6373)


pkg/sql/execinfrapb/flow_diagram.go, line 516 at r1 (raw file):

}

// summary implements the diagramCellType interface.

nit: let's keep the comment.

Copy link
Collaborator Author

@rharding6373 rharding6373 left a comment

Choose a reason for hiding this comment

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

TFTR!

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (and 1 stale) (waiting on @yuzefovich)


pkg/sql/execinfrapb/flow_diagram.go, line 516 at r1 (raw file):

Previously, yuzefovich (Yahor Yuzefovich) wrote…

nit: let's keep the comment.

oops, thanks for the catch!

@rharding6373
Copy link
Collaborator Author

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 18, 2022

Build failed (retrying...):

@rharding6373
Copy link
Collaborator Author

bors r-

@craig
Copy link
Contributor

craig bot commented Feb 18, 2022

Canceled.

This change allows missing specs (e.g., RestoreDataSpec and
SplitAndScatterSpec) to be shown in plan diagrams. Before this change a
plan involving these types would result in an error generating the
diagrams. Also added a test to make sure future specs implement the
`diagramCellType` interface, which is required to generate diagrams.

Release note: None
@rharding6373
Copy link
Collaborator Author

bors r+

@craig
Copy link
Contributor

craig bot commented Feb 19, 2022

Build succeeded:

@craig craig bot merged commit 255c1fb into cockroachdb:master Feb 19, 2022
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.

3 participants