-
Notifications
You must be signed in to change notification settings - Fork 1.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
[Enhancement] support trino's show schemas function #50586
base: main
Are you sure you want to change the base?
Conversation
[Java-Extensions Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
hi rohitrs1983 thanks for your contribution! |
@wangsimo0 ok got it. let me give it a try. thanks for the review. |
@wangsimo0 updated trino dialect. can you please review. |
Signed-off-by: Rohit Satardekar <[email protected]>
2e68f26
to
16de7d2
Compare
Quality Gate failedFailed conditions See analysis details on SonarCloud Catch issues before they fail your Quality Gate with our IDE extension SonarLint |
@@ -321,7 +321,7 @@ setCatalogStatement | |||
|
|||
showDatabasesStatement | |||
: SHOW DATABASES ((FROM | IN) catalog=qualifiedName)? ((LIKE pattern=string) | (WHERE expression))? | |||
| SHOW SCHEMAS ((LIKE pattern=string) | (WHERE expression))? | |||
| SHOW SCHEMAS (FROM catalog=qualifiedName)? ((LIKE pattern=string) | (WHERE expression))? |
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.
If you convert show shemas to show databases using trino parser, there is no need to modify starrocks parser
Why I'm doing:
What I'm doing:
mysql> set sql_dialect=trino;
mysql> show schemas;
+--------------------+
| Database |
+--------------------+
| statistics |
| information_schema |
| mydb |
| sys |
+--------------------+
mysql> show schemas from default_catalog;
+--------------------+
| Database |
+--------------------+
| statistics |
| information_schema |
| mydb |
| sys |
+--------------------+
mysql> show schemas from default_catalog like '__db';
+----------+
| Database |
+----------+
| mydb |
+----------+
Fixes #40894
What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: