Versions Compared

Key

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

...

  • Add Catalog DDL enhancement support
  • Add Database DDL enhancement support
  • Add Table DDL enhancement support
  • Add Function DDL enhancement support

Note:

The following issues are out of the scope of this FLIP. They will be taken care of by other teams/committers.

...

Code Block
languagesql
ALTER TABLE [[catalogName.] dataBasesName].tableName 
SET TBLROPERTIESROPERTIES (name=value [, name=value]*)

Set the properties of an existing table 

Function DDL:

  • createFunctionStatement:

Code Block
languagesql
CREATE FUNCTION [IF NOT EXISTS] [[catalogName.]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
languagesql
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
languagesql
  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
languagesql
  SHOW FUNCTIONS

Return all functions in the current database.

note: already support in sql client but need support in tEnv.sqlQuery();

Implementation Changes:

  1. Unify the parser way of SQL CLI and Flink SQL parser
  2. Add DDL mentioned above one by one in flink sql parser and support execute both in SQL CL and TableEnvironment.sqlQuery() or TableEnvironment.sqlUpdate()

...