-
Notifications
You must be signed in to change notification settings - Fork 42
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
fix: cases sensitivity for statement options keywords #2231
fix: cases sensitivity for statement options keywords #2231
Conversation
@universalmind303 I had originally made this change in the parser logic, but that caused failures in the case-sensitive slt checks. Is #2199 only specific to CLi-based inputs? |
This should definitely happen in the parser only for the
|
location
keyword
If i'm following the logic correctly, glaredb/crates/sqlexec/src/planner/session_planner.rs Lines 596 to 599 in 6e2cb0f
glaredb/crates/sqlexec/src/planner/session_planner.rs Lines 2052 to 2055 in 6e2cb0f
I did not see any calls to those methods that didn't use a lowercase key, so in that case, would it be best to handle this in glaredb/crates/sqlexec/src/parser/options.rs Line 277 in a2d1c5f
Or is it as simple as just checking whether this identifier is glaredb/crates/sqlexec/src/parser.rs Line 848 in a2d1c5f
|
I think it'd be safe to assume all keys inside I think we can just |
20aa893
to
73ed435
Compare
@seve-martinez PR looks good, can we add a slt (sql logic tests) for various casings? |
73ed435
to
8df60a4
Compare
I added some to the |
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.
- the title of the pr seems like it should be updated as it's really all option keywords
- are there other or additional tests that might be useful (I think we're good, but I wanted to check).
location
keyword
Closes #2199 .
Prevents casing issues when using the CLI by forcing statement option keys to be lowercase: