...
alterDatabaseStatement:
Code Block | ||
---|---|---|
| ||
ALTER ALTER DATABASE DATABASE [ catalogName.] dataBaseName SET DBPROPERTIES (name=value [, name=value]*) |
...
We propose to add the following DDLs related to table operations.
showTablesStatement:
Code Block | ||
---|---|---|
| ||
SHOW TABLES |
Return all tables in the current database.
note: already support in sql client but need support in tEnv.sqlQuery();
descTableStatement:
Code Block | ||
---|---|---|
| ||
DESCRIBE [ EXTENDED] [[catalogName.] dataBasesName].tableName |
Return the metadata of an existing table (column names, data types, and comments).
EXTENDED
Display detailed information about the table, including table type, properties and so on.
note: already support in sql client but need support in tEnv.sqlQuery();
alterTableStatement:
Code Block | ||
---|---|---|
| ||
ALTER TABLE [[catalogName.] dataBasesName].tableName |
...
REAME TO newTableName |
Rename an existing table.
Code Block | ||
---|---|---|
| ||
ALTER |
...
TABLE [[catalogName.] dataBasesName].tableName |
...
SET TBLROPERTIES (name=value [, name=value]*) |
Set the properties of an existing table
Function DDL:
createFunctionStatement:
Code Block | ||
---|---|---|
| ||
CREATE FUNCTION |
...
[IF NOT EXISTS] [[ |
...
catalog Name.]databaseName.]functionName AS className. |
Create a function indicated by a className
IF NOT EXISTS
If a function with the same name already exists, nothing will happen.
dropFunctionStatement:
Code Block | ||
---|---|---|
| ||
DROP FUNCTION [IF EXISTS] |
...
[[catalogName.]databaseName.]functionName. |
Create a function indicated by a className
IF EXISTS
If a function with the same name not exists, nothing will happen.
alterFunctionStatement:
Code Block | ||
---|---|---|
| ||
ALTER FUNCTION [IF EXISTS] [ [catalogName.]databaseName.] |
...
functionName RENAME TO new_name; |
Rename a non-temporary function to new name.
IF EXISTS
If a function with the same name not exists, nothing will happen.
showFunctionsStatement:
Code Block | ||
---|---|---|
| ||
SHOW FUNCTIONS |
Return all functions in the current database.
note: already support in sql client but need support in tEnv.sqlQuery();
Implementation Changes:
- Unify the parser way of SQL CLI and Flink SQL parser
- Add DDL mentioned above one by one in flink sql parser and support execute both in SQL CL and TableEnvironment.sqlQuery() or TableEnvironment.sqlUpdate()
Compatibility, Deprecation, and Migration Plan
...