-
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
tree: fix formatting of SHOW BACKUP WITH OPTIONS #110580
tree: fix formatting of SHOW BACKUP WITH OPTIONS #110580
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.
lgtm mod a dev gen
8680c66
to
903211d
Compare
can you add a testcase that doesn't round-trip in the normalized form before this change but does after? The example in 110411 of |
Ah i see the issue now. The test failed on the 22.2 branch: #110411 (comment). But on that branch, SHOW BACKUP is using |
I think #110622 shouldn't break too much; none of the SHOW BACKUP options take non-string RHS values, so I don't think there is anything that worked with the 22.2 string/string map that would break if it is switched to a typed rules. |
closing in favor of #110622 |
actually, here is a test case that does not round trip (parse, format, parse) on all branches currently:
It is because of this parser lookahead logic: cockroach/pkg/sql/parser/lexer.go Lines 245 to 249 in 8316976
For the same reason, the following statement cannot even be parsed in the first place.
I think we should go with this PR. |
903211d
to
d83436d
Compare
That parameter doesn't need to be named |
I don't really care all that much about the canonicalization of this So I'm not going to oppose merging this but I also think we could just change |
I will leave that up to you. It seems like it would be a backwards incompatible syntax change (not just a change in the outputs returned by SHOW). If it's OK to do under our API stability contracts for SHOW, I will let DR drive that effort. I gave the backport of e6f47a0 a shot, but there were too many conflicts for me to be able to do it myself. If you don't have any opposition to merging this PR I will go ahead with it.
Ack. It doesn't seem like a major priority to me, but you'd know better about this area. |
This avoids an ambiguity when formatting the statement. Release note: None
d83436d
to
e1fbdfe
Compare
Works for me. |
bors r+ |
Build failed (retrying...): |
Build succeeded: |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error creating merge commit from e1fbdfe to blathers/backport-release-22.2-110580: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 22.2.x failed. See errors above. error creating merge commit from e1fbdfe to blathers/backport-release-23.1-110580: POST https://api.github.com/repos/cockroachdb/cockroach/merges: 409 Merge conflict [] you may need to manually resolve merge conflicts with the backport tool. Backport to branch 23.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
This avoids an ambiguity when formatting the statement.
fixes #110411
Release note: None