Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

We can see current flink many sql statements only support showing with full datas, without 'FROM/IN' or 'LIKE' filter clause.


show create

Support or Not

show create database

No

show create table

Yes

show create view

Yes

show create function

No


describe

Support or Not

describe catalog

No

describe database

No

describe table

Yes

describe function

No

describe

query

view

No

current flink only supports describing tables.

...

So we propose this flip, try to support these features.

Proposed Syntax Changes:

We compare flink with other popular engines and give an improved syntax, because it may be modified under discuss, we put it on the google docs. 

please see FLIP-297: Improve Auxiliary Sql Statements Docs, Feedback is welcome. 


before

after(under discussed)

Note

show catalogs

SHOW CATALOGS

SHOW CATALOGS[ [NOT] LIKE <sql_like_pattern> ]


show databases

SHOW DATABASES

SHOW DATABASES [ ( FROM | IN ) catalog_name] [ [NOT] LIKE <sql_like_pattern> ]


show functions

SHOW [USER] FUNCTIONS

SHOW [USER] FUNCTIONS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] LIKE <sql_like_pattern> ]


show views

SHOW VIEWS

SHOW VIEWS [ ( FROM | IN ) [catalog_name.]database_name ] [ [NOT] LIKE <sql_like_pattern> ]


show modules

SHOW [FULL] MODULES

SHOW [FULL] MODULES [ [NOT] LIKE <sql_like_pattern> ]


show jars

SHOW JARS

SHOW JARS [ [NOT] LIKE <sql_like_pattern> ]

only work in SQL CLI or SQL Gateway.

show jobs

SHOW JOBS

SHOW JOBS [ [NOT] LIKE <sql_like_pattern> ]

only work in SQL CLI or SQL Gateway.

describe catalog

Not Support

{ DESCRIBE | DESC } CATALOG catalog_name


describe database

Not Support

{ DESCRIBE | DESC } DATABASE [catalog_name.]db_name


describe function

Not Support

{ DESCRIBE | DESC } FUNCTION [catalog_name.][db_name.]function


describe query

Not Support

{ DESCRIBE | DESC } [ QUERY ] input_statement


...