-
Notifications
You must be signed in to change notification settings - Fork 753
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
feat: Support USE CATALOG syntax and current_catalog() function #16926
base: main
Are you sure you want to change the base?
Conversation
I observe that
|
let use_catalog = map( | ||
rule! { | ||
(USE ~ CATALOG) ~ #ident | ||
}, |
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.
remove the parenthesis will fix the matched as use database
issues
rule! {
USE ~ CATALOG ~ #ident
},
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.
I removed the parenthesis but still the same result
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.
I made a mistake. It's okay to keep the parenthesis.
This problem should be caused by the MySQL client, you can use the BendSQL client to test this case. And please add some test cases to this file src/query/ast/tests/it/parser.rs
for verification.
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
current_catalog()
function #16848Tests
Type of change
This change is