-
Notifications
You must be signed in to change notification settings - Fork 13k
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
[FLINK-31481][table] Support enhanced show databases syntax #23612
Conversation
Hi @MartijnVisser could you please check this PR? |
...k-table-api-java/src/main/java/org/apache/flink/table/operations/ShowDatabasesOperation.java
Outdated
Show resolved
Hide resolved
...k-table-api-java/src/main/java/org/apache/flink/table/operations/ShowDatabasesOperation.java
Outdated
Show resolved
Hide resolved
...ain/java/org/apache/flink/table/planner/operations/converters/SqlShowDatabasesConverter.java
Outdated
Show resolved
Hide resolved
...k-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/dql/SqlShowDatabases.java
Show resolved
Hide resolved
This is looking pretty good. Since implementing FLIP-297 is assigned to @chucheng92, we should get his input as well! @jeyhunkarimov have you signed up for the Flink JIRA? You may need to request access on the Flink dev list. (I tried to find instructions, but I am not seeing them immediately.) |
@jeyhunkarimov good work! Currently i'm busy with other work, feel free to assign to yourself. |
ad52b5f
to
78cafaf
Compare
Thanks for the comment @chucheng92 and thank you for the review @jnh5y . I addressed your comments. Could you please check if you have any other comments? P.s I have jira account (jID: jeyhunkarimov). I can assign tasks to myself in other apache projects (e.g., kafka). However, in Flink this is not possible. I will ask for the required permissions via dev mailing list. |
Hi @jnh5y could you please check if your comments are addressed? Thanks! |
if (this.catalogName != null && this.catalogName.names.size() > 1) { | ||
throw new ParseException( | ||
String.format( | ||
"Show databases from/in identifier [ %s ] format error, catalog cannot contain dot character.", |
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.
As something that I'm unsure about... I wonder if a catalog name can contain a .
if it quoted with backticks.
If so, then this statement is inaccurate.
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 believe you can quote any character.
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.
Given the responses, could you please update the exception to e.g.
"Show databases from/in identifier [ %s ] format error, catalog must be a single part identifier."
...k-table-api-java/src/main/java/org/apache/flink/table/operations/ShowDatabasesOperation.java
Outdated
Show resolved
Hide resolved
Hi @jeyhunkarimov, sorry to be slow to look again. Things are looking good. @dawidwys would you be willing to take a quick read through. I've left some comments where I think you could provide some insight about what needs to change for this work to be merged. |
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.
Thank you @jeyhunkarimov for the work! The PR looks really good! I put some small comments. I think we can get it in shortly!
...k-table/flink-sql-parser/src/main/java/org/apache/flink/sql/parser/dql/SqlShowDatabases.java
Outdated
Show resolved
Hide resolved
...k-table-api-java/src/main/java/org/apache/flink/table/operations/ShowDatabasesOperation.java
Outdated
Show resolved
Hide resolved
...k-table-api-java/src/main/java/org/apache/flink/table/operations/ShowDatabasesOperation.java
Outdated
Show resolved
Hide resolved
...ain/java/org/apache/flink/table/planner/operations/converters/SqlShowDatabasesConverter.java
Outdated
Show resolved
Hide resolved
4e8b7e5
to
652a9cf
Compare
@flinkbot run azure |
e889b90
to
633fd8d
Compare
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 changes look good. There is one last comment to be addressed and I'll merge the PR. Thank you @jeyhunkarimov
if (this.catalogName != null && this.catalogName.names.size() > 1) { | ||
throw new ParseException( | ||
String.format( | ||
"Show databases from/in identifier [ %s ] format error, catalog cannot contain dot character.", |
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.
Given the responses, could you please update the exception to e.g.
"Show databases from/in identifier [ %s ] format error, catalog must be a single part identifier."
633fd8d
to
29cb2f6
Compare
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.
lgtm
What is the purpose of the change
Support enhanced show functions syntax described in FLIP-297
Brief change log
Changelog from:
to:
Verifying this change
flink-table/flink-sql-client/src/test/resources/sql/catalog_database.q
flink-table/flink-sql-parser/src/test/java/org/apache/flink/sql/parser/FlinkSqlParserImplTest.java -> testShowDataBases()
flink-table/flink-table-planner/src/test/java/org/apache/flink/table/planner/operations/SqlOtherOperationConverterTest.java -> testShowDatabases()
Does this pull request potentially affect one of the following parts:
@Public(Evolving)
: noDocumentation