-
Notifications
You must be signed in to change notification settings - Fork 3.8k
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
opt: run sqlsmith roachtest queries with EXPLAIN #88333
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! 1 of 0 LGTMs obtained (waiting on @mgartner)
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.
Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: complete! 2 of 0 LGTMs obtained (waiting on @DrewKimball and @mgartner)
pkg/cmd/roachtest/tests/sqlsmith.go
line 231 at r1 (raw file):
if err == nil { logStmt(stmt) explainStmt := "EXPLAIN " + stmt
nit: I think we should do stmt = "EXPLAIN " + stmt
here so that in case running the stmt is ok but explaining it is not we do see that it was the EXPLAIN that failed.
This commit modifies the SqlSmith roachtest to run each generated query with explain. This should allow the test to catch planning errors that do not happen during normal execution. Informs cockroachdb#88037 Release note: None
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.
TFTRs!
Reviewable status: complete! 2 of 0 LGTMs obtained (waiting on @mgartner)
pkg/cmd/roachtest/tests/sqlsmith.go
line 231 at r1 (raw file):
Previously, yuzefovich (Yahor Yuzefovich) wrote…
nit: I think we should do
stmt = "EXPLAIN " + stmt
here so that in case running the stmt is ok but explaining it is not we do see that it was the EXPLAIN that failed.
Done.
0858f7c
to
3e23a24
Compare
Test failure seems unrelated,
|
bors r+ |
Build succeeded: |
This commit modifies the SqlSmith roachtest to run each generated query with explain. This should allow the test to catch planning errors that do not happen during normal execution.
Informs #88037
Release note: None