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/parser: EXPLAIN does not pretty-print its AST correctly #51830

Closed
knz opened this issue Jul 23, 2020 · 4 comments
Closed

sql/parser: EXPLAIN does not pretty-print its AST correctly #51830

knz opened this issue Jul 23, 2020 · 4 comments
Labels
A-sql-syntax Issues strictly related to the SQL grammar, with no semantic aspect C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-rsg Random Syntax Generator

Comments

@knz
Copy link
Contributor

knz commented Jul 23, 2020

Found by the RSG at https://teamcity.cockroachdb.com/buildConfiguration/Cockroach_Nightlies_RandomSyntaxTests/2107812?showLog=2107812_12614_5028.12614

        TestRandomSyntaxGeneration: rsg_test.go:756: Parse followed by Format is not idempotent: "EXPLAIN ANALYZE ( PLAN ) RESTORE FROM ( PLACEHOLDER ) WITH OPTIONS ( 'string' , EXPERIMENTAL_AUDIT )" -> "EXPLAIN ANALYZE RESTORE FROM 'placeholder' WITH \"string\", experimental_audit" != "EXPLAIN ANALYZE (DISTSQL) RESTORE FROM 'placeholder' WITH \"string\", experimental_audit"

cc @dt @miretskiy for triage

@knz knz added C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. A-sql-syntax Issues strictly related to the SQL grammar, with no semantic aspect O-rsg Random Syntax Generator labels Jul 23, 2020
@knz knz mentioned this issue Jul 23, 2020
25 tasks
@dt
Copy link
Member

dt commented Jul 23, 2020

Isn’t the printed RESTORE AST the same in both of those?

@knz knz changed the title bulkio+sql/parser: RESTORE does not pretty-print its AST correctly sql/parser: EXPLAIN does not pretty-print its AST correctly Jul 23, 2020
@knz
Copy link
Contributor Author

knz commented Jul 23, 2020

Oh you're right. This is not a bulk I/O problem. The problem is in the EXPLAIN options.

@RaduBerinde @yuzefovich can you re-route this to the right person thanks.

@rohany
Copy link
Contributor

rohany commented Jul 27, 2020

I thought that @RaduBerinde fixed this already (or something that looked like this)

@RaduBerinde
Copy link
Member

Indeed, should be fixed by #51477.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-sql-syntax Issues strictly related to the SQL grammar, with no semantic aspect C-bug Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior. O-rsg Random Syntax Generator
Projects
None yet
Development

No branches or pull requests

4 participants