-
Notifications
You must be signed in to change notification settings - Fork 3.9k
sql: display postqueries in EXPLAIN #38849
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this!
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @jordanlewis, @RaduBerinde, and @yuzefovich)
pkg/sql/logictest/testdata/planner_test/postquery, line 1 at r1 (raw file):
# LogicTest: local-opt fakedist-opt
This is great, except this should live in opt/execbuilder/testdata
(everything in planner_test is non-opt). Can you also rename it to fk_opt
? To correspond with the fk_opt
file in logictests.
pkg/sql/logictest/testdata/planner_test/postquery, line 13 at r1 (raw file):
statement ok INSERT INTO parent VALUES (1), (2)
[nit] remove this (data doesn't matter when we're just explaining)
13295ae
to
42cc321
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 0 of 0 LGTMs obtained (waiting on @jordanlewis and @RaduBerinde)
pkg/sql/logictest/testdata/planner_test/postquery, line 1 at r1 (raw file):
Previously, RaduBerinde wrote…
This is great, except this should live in
opt/execbuilder/testdata
(everything in planner_test is non-opt). Can you also rename it tofk_opt
? To correspond with thefk_opt
file in logictests.
Done.
pkg/sql/logictest/testdata/planner_test/postquery, line 13 at r1 (raw file):
Previously, RaduBerinde wrote…
[nit] remove this (data doesn't matter when we're just explaining)
Indeed, done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @jordanlewis and @yuzefovich)
pkg/sql/explain_plan.go, line 368 at r2 (raw file):
return err } observer.attr("postquery", "id", fmt.Sprintf("@S%d", i+1))
[nit] I don't think this id is useful in the output. I will (after this PR merges) add a field to the node with a "description" of the postquery, (e.g. FK-check-<fk-name>
).
pkg/sql/opt/exec/execbuilder/testdata/fk_opt, line 1 at r2 (raw file):
# LogicTest: local-opt fakedist-opt
remove fakedist-opt (local vs fakedist makes no difference in these tests where we just EXPLAIN)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @jordanlewis and @RaduBerinde)
pkg/sql/explain_plan.go, line 368 at r2 (raw file):
Previously, RaduBerinde wrote…
[nit] I don't think this id is useful in the output. I will (after this PR merges) add a field to the node with a "description" of the postquery, (e.g.
FK-check-<fk-name>
).
Yeah, I was also thinking it's not useful. Removed.
pkg/sql/opt/exec/execbuilder/testdata/fk_opt, line 1 at r2 (raw file):
Previously, RaduBerinde wrote…
remove fakedist-opt (local vs fakedist makes no difference in these tests where we just EXPLAIN)
Done.
42cc321
to
89f261b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status:
complete! 1 of 0 LGTMs obtained (waiting on @jordanlewis)
Postqueries are now displayed in the output of EXPLAIN statement. Release note: None
89f261b
to
19bc3ac
Compare
TFTR! bors r+ |
Build failed |
Seems like a flake. bors r+ |
38849: sql: display postqueries in EXPLAIN r=yuzefovich a=yuzefovich Postqueries are now displayed in the output of EXPLAIN statement. Fixes: #38340. Release note: None Co-authored-by: Yahor Yuzefovich <[email protected]>
Build succeeded |
Postqueries are now displayed in the output of EXPLAIN statement.
Fixes: #38340.
Release note: None