-
Notifications
You must be signed in to change notification settings - Fork 28.4k
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
[SPARK-22999][SQL]'show databases like command' can remove the like keyword #20194
Conversation
@@ -141,7 +141,7 @@ statement | |||
(LIKE? pattern=STRING)? #showTables | |||
| SHOW TABLE EXTENDED ((FROM | IN) db=identifier)? | |||
LIKE pattern=STRING partitionSpec? #showTable | |||
| SHOW DATABASES (LIKE pattern=STRING)? #showDatabases | |||
| SHOW DATABASES (LIKE? pattern=STRING)? #showDatabases |
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.
We are following Hive. Any change was made in the recent releases of Hive?
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.
Hive did not change, but I think spark can change the next.
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.
@guoxiaolongzte . MySQL also doesn't work like that. Do you have any reference for that syntax?
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.
No, I just saw like show tables like can be removed. so I think show databases like can also be removed. Just think it is removed, the operation is more convenient.
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.
Impala is the only reference I can find https://www.cloudera.com/documentation/enterprise/5-10-x/topics/impala_show.html
To be consistent with the other SHOW function, we can make LIKE optional?
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.
@gatorsmile @dongjoon-hyun
I think we can make LIKE optional.
OK to test |
ok to test |
test this please |
Test build #86120 has finished for PR 20194 at commit
|
cc @hvanhovell , too. |
LGTM Thanks! Merged to master/2.3 |
…eyword ## What changes were proposed in this pull request? SHOW DATABASES (LIKE pattern = STRING)? Can be like the back increase? When using this command, LIKE keyword can be removed. You can refer to the SHOW TABLES command, SHOW TABLES 'test *' and SHOW TABELS like 'test *' can be used. Similarly SHOW DATABASES 'test *' and SHOW DATABASES like 'test *' can be used. ## How was this patch tested? unit tests manual tests Please review http://spark.apache.org/contributing.html before opening a pull request. Author: guoxiaolong <[email protected]> Closes #20194 from guoxiaolongzte/SPARK-22999. (cherry picked from commit 42a1a15) Signed-off-by: gatorsmile <[email protected]>
What changes were proposed in this pull request?
SHOW DATABASES (LIKE pattern = STRING)? Can be like the back increase?
When using this command, LIKE keyword can be removed.
You can refer to the SHOW TABLES command, SHOW TABLES 'test *' and SHOW TABELS like 'test *' can be used.
Similarly SHOW DATABASES 'test *' and SHOW DATABASES like 'test *' can be used.
How was this patch tested?
unit tests manual tests
Please review http://spark.apache.org/contributing.html before opening a pull request.