-
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
sql/tests: TestRandomSyntaxGeneration failed [index visibility precision] #108083
Comments
This syntax was added by SQL Queries, so moving there. |
oh @annrpom just saw you picked it up! you are welcome to work on this if you'd like to get familiar with this |
The issue is about formatting VISIBILITY value in an index. In code, this is represented as a |
Maybe we should be using a decimal instead of a float for this value? |
a decimal could have made sense, but i don't think it will be backwards-compatible to change now, since the field is already in the proto:
i think the real issue in this ticket is not just that the float gets rounded. more specifically, the problem is that if it gets rounded to zero, then the statement formatting logic has a special case: cockroach/pkg/sql/sem/tree/alter_index.go Lines 88 to 94 in 142b971
But I do agree that if we just remove the |
If |
Removing the |
109697: sql: fix index visibility parsing for small values r=mgartner a=mgartner This commit updates the parser and AST to keep track of whether or not an index `VISIBILITY` float was provided in a `CREATE TABLE`, `CREATE INDEX`, or `ALTER INDEX` statement. This allows the statements to be round-tripped correctly with very low float values that would be rounded to zero and change the `VISIBILITY` clause into `NOT VISIBLE`. Fixes #108083 Release note: None Co-authored-by: Marcus Gartner <[email protected]>
sql/tests.TestRandomSyntaxGeneration failed with artifacts on master @ 4fe2a80d81c6fc5a3da3c7c44c5fc38da67e0367:
Help
See also: How To Investigate a Go Test Failure (internal)
This test on roachdash | Improve this report!
Jira issue: CRDB-30306
The text was updated successfully, but these errors were encountered: