You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Flink Jira Bot (Jira)" <ji...@apache.org> on 2022/07/06 22:38:00 UTC

[jira] [Updated] (FLINK-25684) Support enhanced show databases syntax

     [ https://issues.apache.org/jira/browse/FLINK-25684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Flink Jira Bot updated FLINK-25684:
-----------------------------------
    Labels: pull-request-available stale-assigned  (was: pull-request-available)

I am the [Flink Jira Bot|https://github.com/apache/flink-jira-bot/] and I help the community manage its development. I see this issue is assigned but has not received an update in 30 days, so it has been labeled "stale-assigned".
If you are still working on the issue, please remove the label and add a comment updating the community on your progress.  If this issue is waiting on feedback, please consider this a reminder to the committer/reviewer. Flink is a very active project, and so we appreciate your patience.
If you are no longer working on the issue, please unassign yourself so someone else may work on it.


> Support enhanced show databases syntax
> --------------------------------------
>
>                 Key: FLINK-25684
>                 URL: https://issues.apache.org/jira/browse/FLINK-25684
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / API
>            Reporter: Moses
>            Assignee: Moses
>            Priority: Major
>              Labels: pull-request-available, stale-assigned
>
> Enhanced `show databases` statement like ` show databasesfrom like 'db%' ` has been supported broadly in many popular SQL engine like Spark SQL/MySQL.
> We could use such statement to easily show the databases that we wannted.
> h3. SHOW DATABSES [ LIKE regex_pattern ]
> Examples:
> {code:java}
> Flink SQL> create database db1;
> [INFO] Execute statement succeed.
> Flink SQL> create database db1_1;
> [INFO] Execute statement succeed.
> Flink SQL> create database pre_db;
> [INFO] Execute statement succeed.
> Flink SQL> show databases;
> +------------------+
> |    database name |
> +------------------+
> | default_database |
> |              db1 |
> |            db1_1 |
> |           pre_db |
> +------------------+
> 4 rows in set
> Flink SQL> show databases like 'db1';
> +---------------+
> | database name |
> +---------------+
> |           db1 |
> +---------------+
> 1 row in set
> Flink SQL> show databases like 'db%';
> +---------------+
> | database name |
> +---------------+
> |           db1 |
> |         db1_1 |
> +---------------+
> 2 rows in set
> Flink SQL> show databases like '%db%';
> +---------------+
> | database name |
> +---------------+
> |           db1 |
> |         db1_1 |
> |        pre_db |
> +---------------+
> 3 rows in set
> Flink SQL> show databases like '%db';
> +---------------+
> | database name |
> +---------------+
> |        pre_db |
> +---------------+
> 1 row in set
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)