-
-
Notifications
You must be signed in to change notification settings - Fork 238
Prevent identifiers longer than 64 characters #2048
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.
This improves correctness but the implementation is counterproductive to the ongoing refactors. Validation should happen before query rewrites. For ex, you don't need a new rule to validate the ident when converting ast.RenameTable to plan.RenameTable. Named rules are useful when series of seemingly OK individual transforms in combination create problems. Validation doesn't benefit from rule names for context, errors are typed and provide all of the necessary context.
enginetest/memory_engine_test.go
Outdated
| var scripts = []queries.ScriptTest{ | ||
| { | ||
| Name: "add new generated column", | ||
| Name: "Identifier lengths", |
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.
changes to this file make PRs in GItHub harder to read and usually cause merge conflicts
53cdfb4 to
c571c3c
Compare
Discussed offline. I initially made this change in part, but on consideration this pattern of erroring on statements during parse that used to parse correctly can be very dangerous for backwards compatibility, since existing databases definitions will no longer parse without error in contexts where they need to. To move more validation logic into the parser safely, we need to also support permissive parsing modes to prevent existing databases from tripping newly added validations. |
Also fixed a bug where we allowed multiple column names with the same case-insensitive name
Fixes dolthub/dolt#6611