Search in sources :

Example 6 with CreateTableOperation

use of org.apache.flink.table.operations.ddl.CreateTableOperation in project flink by apache.

the class SqlToOperationConverterTest method testCreateTableWithMinusInOptionKey.

@Test
public void testCreateTableWithMinusInOptionKey() {
    final String sql = "create table source_table(\n" + "  a int,\n" + "  b bigint,\n" + "  c varchar\n" + ") with (\n" + "  'a-B-c-d124' = 'Ab',\n" + "  'a.b-c-d.e-f.g' = 'ada',\n" + "  'a.b-c-d.e-f1231.g' = 'ada',\n" + "  'a.b-c-d.*' = 'adad')\n";
    final FlinkPlannerImpl planner = getPlannerBySqlDialect(SqlDialect.DEFAULT);
    final CalciteParser parser = getParserBySqlDialect(SqlDialect.DEFAULT);
    SqlNode node = parser.parse(sql);
    assertThat(node).isInstanceOf(SqlCreateTable.class);
    Operation operation = SqlToOperationConverter.convert(planner, catalogManager, node).get();
    assertThat(operation).isInstanceOf(CreateTableOperation.class);
    CreateTableOperation op = (CreateTableOperation) operation;
    CatalogTable catalogTable = op.getCatalogTable();
    Map<String, String> options = catalogTable.getOptions().entrySet().stream().collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
    Map<String, String> sortedProperties = new TreeMap<>(options);
    final String expected = "{a-B-c-d124=Ab, " + "a.b-c-d.*=adad, " + "a.b-c-d.e-f.g=ada, " + "a.b-c-d.e-f1231.g=ada}";
    assertThat(sortedProperties.toString()).isEqualTo(expected);
}
Also used : FlinkPlannerImpl(org.apache.flink.table.planner.calcite.FlinkPlannerImpl) OperationMatchers.isCreateTableOperation(org.apache.flink.table.planner.utils.OperationMatchers.isCreateTableOperation) DropDatabaseOperation(org.apache.flink.table.operations.ddl.DropDatabaseOperation) SinkModifyOperation(org.apache.flink.table.operations.SinkModifyOperation) AlterTableOptionsOperation(org.apache.flink.table.operations.ddl.AlterTableOptionsOperation) AlterTableDropConstraintOperation(org.apache.flink.table.operations.ddl.AlterTableDropConstraintOperation) UseCatalogOperation(org.apache.flink.table.operations.UseCatalogOperation) UseDatabaseOperation(org.apache.flink.table.operations.UseDatabaseOperation) CreateViewOperation(org.apache.flink.table.operations.ddl.CreateViewOperation) ShowJarsOperation(org.apache.flink.table.operations.command.ShowJarsOperation) AlterDatabaseOperation(org.apache.flink.table.operations.ddl.AlterDatabaseOperation) QueryOperation(org.apache.flink.table.operations.QueryOperation) EndStatementSetOperation(org.apache.flink.table.operations.EndStatementSetOperation) UseModulesOperation(org.apache.flink.table.operations.UseModulesOperation) ShowFunctionsOperation(org.apache.flink.table.operations.ShowFunctionsOperation) CreateDatabaseOperation(org.apache.flink.table.operations.ddl.CreateDatabaseOperation) SetOperation(org.apache.flink.table.operations.command.SetOperation) LoadModuleOperation(org.apache.flink.table.operations.LoadModuleOperation) Operation(org.apache.flink.table.operations.Operation) ShowModulesOperation(org.apache.flink.table.operations.ShowModulesOperation) SourceQueryOperation(org.apache.flink.table.operations.SourceQueryOperation) UnloadModuleOperation(org.apache.flink.table.operations.UnloadModuleOperation) CreateTableOperation(org.apache.flink.table.operations.ddl.CreateTableOperation) RemoveJarOperation(org.apache.flink.table.operations.command.RemoveJarOperation) BeginStatementSetOperation(org.apache.flink.table.operations.BeginStatementSetOperation) AddJarOperation(org.apache.flink.table.operations.command.AddJarOperation) AlterTableAddConstraintOperation(org.apache.flink.table.operations.ddl.AlterTableAddConstraintOperation) ExplainOperation(org.apache.flink.table.operations.ExplainOperation) ResetOperation(org.apache.flink.table.operations.command.ResetOperation) StatementSetOperation(org.apache.flink.table.operations.StatementSetOperation) AlterTableRenameOperation(org.apache.flink.table.operations.ddl.AlterTableRenameOperation) OperationMatchers.isCreateTableOperation(org.apache.flink.table.planner.utils.OperationMatchers.isCreateTableOperation) CreateTableOperation(org.apache.flink.table.operations.ddl.CreateTableOperation) CatalogTable(org.apache.flink.table.catalog.CatalogTable) TreeMap(java.util.TreeMap) Map(java.util.Map) TreeMap(java.util.TreeMap) HashMap(java.util.HashMap) CalciteParser(org.apache.flink.table.planner.parse.CalciteParser) SqlNode(org.apache.calcite.sql.SqlNode) Test(org.junit.Test)

Example 7 with CreateTableOperation

use of org.apache.flink.table.operations.ddl.CreateTableOperation in project flink by apache.

the class SqlToOperationConverterTest method testCreateTableWithPrimaryKey.

@Test
public void testCreateTableWithPrimaryKey() {
    final String sql = "CREATE TABLE tbl1 (\n" + "  a bigint,\n" + "  b varchar, \n" + "  c int, \n" + "  d varchar, \n" + "  constraint ct1 primary key(a, b) not enforced\n" + ") with (\n" + "  'connector' = 'kafka', \n" + "  'kafka.topic' = 'log.test'\n" + ")\n";
    FlinkPlannerImpl planner = getPlannerBySqlDialect(SqlDialect.DEFAULT);
    final CalciteParser parser = getParserBySqlDialect(SqlDialect.DEFAULT);
    Operation operation = parse(sql, planner, parser);
    assertThat(operation).isInstanceOf(CreateTableOperation.class);
    CreateTableOperation op = (CreateTableOperation) operation;
    CatalogTable catalogTable = op.getCatalogTable();
    TableSchema tableSchema = catalogTable.getSchema();
    assertThat(tableSchema.getPrimaryKey().map(UniqueConstraint::asSummaryString).orElse("fakeVal")).isEqualTo("CONSTRAINT ct1 PRIMARY KEY (a, b)");
    assertThat(tableSchema.getFieldNames()).isEqualTo(new String[] { "a", "b", "c", "d" });
    assertThat(tableSchema.getFieldDataTypes()).isEqualTo(new DataType[] { DataTypes.BIGINT().notNull(), DataTypes.STRING().notNull(), DataTypes.INT(), DataTypes.STRING() });
}
Also used : TableSchema(org.apache.flink.table.api.TableSchema) FlinkPlannerImpl(org.apache.flink.table.planner.calcite.FlinkPlannerImpl) OperationMatchers.isCreateTableOperation(org.apache.flink.table.planner.utils.OperationMatchers.isCreateTableOperation) DropDatabaseOperation(org.apache.flink.table.operations.ddl.DropDatabaseOperation) SinkModifyOperation(org.apache.flink.table.operations.SinkModifyOperation) AlterTableOptionsOperation(org.apache.flink.table.operations.ddl.AlterTableOptionsOperation) AlterTableDropConstraintOperation(org.apache.flink.table.operations.ddl.AlterTableDropConstraintOperation) UseCatalogOperation(org.apache.flink.table.operations.UseCatalogOperation) UseDatabaseOperation(org.apache.flink.table.operations.UseDatabaseOperation) CreateViewOperation(org.apache.flink.table.operations.ddl.CreateViewOperation) ShowJarsOperation(org.apache.flink.table.operations.command.ShowJarsOperation) AlterDatabaseOperation(org.apache.flink.table.operations.ddl.AlterDatabaseOperation) QueryOperation(org.apache.flink.table.operations.QueryOperation) EndStatementSetOperation(org.apache.flink.table.operations.EndStatementSetOperation) UseModulesOperation(org.apache.flink.table.operations.UseModulesOperation) ShowFunctionsOperation(org.apache.flink.table.operations.ShowFunctionsOperation) CreateDatabaseOperation(org.apache.flink.table.operations.ddl.CreateDatabaseOperation) SetOperation(org.apache.flink.table.operations.command.SetOperation) LoadModuleOperation(org.apache.flink.table.operations.LoadModuleOperation) Operation(org.apache.flink.table.operations.Operation) ShowModulesOperation(org.apache.flink.table.operations.ShowModulesOperation) SourceQueryOperation(org.apache.flink.table.operations.SourceQueryOperation) UnloadModuleOperation(org.apache.flink.table.operations.UnloadModuleOperation) CreateTableOperation(org.apache.flink.table.operations.ddl.CreateTableOperation) RemoveJarOperation(org.apache.flink.table.operations.command.RemoveJarOperation) BeginStatementSetOperation(org.apache.flink.table.operations.BeginStatementSetOperation) AddJarOperation(org.apache.flink.table.operations.command.AddJarOperation) AlterTableAddConstraintOperation(org.apache.flink.table.operations.ddl.AlterTableAddConstraintOperation) ExplainOperation(org.apache.flink.table.operations.ExplainOperation) ResetOperation(org.apache.flink.table.operations.command.ResetOperation) StatementSetOperation(org.apache.flink.table.operations.StatementSetOperation) AlterTableRenameOperation(org.apache.flink.table.operations.ddl.AlterTableRenameOperation) OperationMatchers.isCreateTableOperation(org.apache.flink.table.planner.utils.OperationMatchers.isCreateTableOperation) CreateTableOperation(org.apache.flink.table.operations.ddl.CreateTableOperation) CatalogTable(org.apache.flink.table.catalog.CatalogTable) CalciteParser(org.apache.flink.table.planner.parse.CalciteParser) Test(org.junit.Test)

Example 8 with CreateTableOperation

use of org.apache.flink.table.operations.ddl.CreateTableOperation in project flink by apache.

the class SqlToOperationConverterTest method testCreateTableWithComputedColumn.

@Test
public void testCreateTableWithComputedColumn() {
    final String sql = "CREATE TABLE tbl1 (\n" + "  a int,\n" + "  b varchar, \n" + "  c as a - 1, \n" + "  d as b || '$$', \n" + "  e as my_udf1(a)," + "  f as `default`.my_udf2(a) + 1," + "  g as builtin.`default`.my_udf3(a) || '##'\n" + ")\n" + "  with (\n" + "    'connector' = 'kafka', \n" + "    'kafka.topic' = 'log.test'\n" + ")\n";
    functionCatalog.registerTempCatalogScalarFunction(ObjectIdentifier.of("builtin", "default", "my_udf1"), Func0$.MODULE$);
    functionCatalog.registerTempCatalogScalarFunction(ObjectIdentifier.of("builtin", "default", "my_udf2"), Func1$.MODULE$);
    functionCatalog.registerTempCatalogScalarFunction(ObjectIdentifier.of("builtin", "default", "my_udf3"), Func8$.MODULE$);
    FlinkPlannerImpl planner = getPlannerBySqlDialect(SqlDialect.DEFAULT);
    Operation operation = parse(sql, planner, getParserBySqlDialect(SqlDialect.DEFAULT));
    assertThat(operation).isInstanceOf(CreateTableOperation.class);
    CreateTableOperation op = (CreateTableOperation) operation;
    CatalogTable catalogTable = op.getCatalogTable();
    assertThat(catalogTable.getSchema().getFieldNames()).isEqualTo(new String[] { "a", "b", "c", "d", "e", "f", "g" });
    assertThat(catalogTable.getSchema().getFieldDataTypes()).isEqualTo(new DataType[] { DataTypes.INT(), DataTypes.STRING(), DataTypes.INT(), DataTypes.STRING(), DataTypes.INT().notNull(), DataTypes.INT(), DataTypes.STRING() });
    String[] columnExpressions = catalogTable.getSchema().getTableColumns().stream().filter(ComputedColumn.class::isInstance).map(ComputedColumn.class::cast).map(ComputedColumn::getExpression).toArray(String[]::new);
    String[] expected = new String[] { "`a` - 1", "`b` || '$$'", "`builtin`.`default`.`my_udf1`(`a`)", "`builtin`.`default`.`my_udf2`(`a`) + 1", "`builtin`.`default`.`my_udf3`(`a`) || '##'" };
    assertThat(columnExpressions).isEqualTo(expected);
}
Also used : FlinkPlannerImpl(org.apache.flink.table.planner.calcite.FlinkPlannerImpl) ComputedColumn(org.apache.flink.table.api.TableColumn.ComputedColumn) OperationMatchers.isCreateTableOperation(org.apache.flink.table.planner.utils.OperationMatchers.isCreateTableOperation) DropDatabaseOperation(org.apache.flink.table.operations.ddl.DropDatabaseOperation) SinkModifyOperation(org.apache.flink.table.operations.SinkModifyOperation) AlterTableOptionsOperation(org.apache.flink.table.operations.ddl.AlterTableOptionsOperation) AlterTableDropConstraintOperation(org.apache.flink.table.operations.ddl.AlterTableDropConstraintOperation) UseCatalogOperation(org.apache.flink.table.operations.UseCatalogOperation) UseDatabaseOperation(org.apache.flink.table.operations.UseDatabaseOperation) CreateViewOperation(org.apache.flink.table.operations.ddl.CreateViewOperation) ShowJarsOperation(org.apache.flink.table.operations.command.ShowJarsOperation) AlterDatabaseOperation(org.apache.flink.table.operations.ddl.AlterDatabaseOperation) QueryOperation(org.apache.flink.table.operations.QueryOperation) EndStatementSetOperation(org.apache.flink.table.operations.EndStatementSetOperation) UseModulesOperation(org.apache.flink.table.operations.UseModulesOperation) ShowFunctionsOperation(org.apache.flink.table.operations.ShowFunctionsOperation) CreateDatabaseOperation(org.apache.flink.table.operations.ddl.CreateDatabaseOperation) SetOperation(org.apache.flink.table.operations.command.SetOperation) LoadModuleOperation(org.apache.flink.table.operations.LoadModuleOperation) Operation(org.apache.flink.table.operations.Operation) ShowModulesOperation(org.apache.flink.table.operations.ShowModulesOperation) SourceQueryOperation(org.apache.flink.table.operations.SourceQueryOperation) UnloadModuleOperation(org.apache.flink.table.operations.UnloadModuleOperation) CreateTableOperation(org.apache.flink.table.operations.ddl.CreateTableOperation) RemoveJarOperation(org.apache.flink.table.operations.command.RemoveJarOperation) BeginStatementSetOperation(org.apache.flink.table.operations.BeginStatementSetOperation) AddJarOperation(org.apache.flink.table.operations.command.AddJarOperation) AlterTableAddConstraintOperation(org.apache.flink.table.operations.ddl.AlterTableAddConstraintOperation) ExplainOperation(org.apache.flink.table.operations.ExplainOperation) ResetOperation(org.apache.flink.table.operations.command.ResetOperation) StatementSetOperation(org.apache.flink.table.operations.StatementSetOperation) AlterTableRenameOperation(org.apache.flink.table.operations.ddl.AlterTableRenameOperation) OperationMatchers.isCreateTableOperation(org.apache.flink.table.planner.utils.OperationMatchers.isCreateTableOperation) CreateTableOperation(org.apache.flink.table.operations.ddl.CreateTableOperation) CatalogTable(org.apache.flink.table.catalog.CatalogTable) Test(org.junit.Test)

Example 9 with CreateTableOperation

use of org.apache.flink.table.operations.ddl.CreateTableOperation in project flink by apache.

the class TableEnvironmentTest method innerTestManagedTableFromDescriptor.

private void innerTestManagedTableFromDescriptor(boolean ignoreIfExists, boolean isTemporary) {
    final TableEnvironmentMock tEnv = TableEnvironmentMock.getStreamingInstance();
    final String catalog = tEnv.getCurrentCatalog();
    final String database = tEnv.getCurrentDatabase();
    final Schema schema = Schema.newBuilder().column("f0", DataTypes.INT()).build();
    final String tableName = UUID.randomUUID().toString();
    ObjectIdentifier identifier = ObjectIdentifier.of(catalog, database, tableName);
    // create table
    MANAGED_TABLES.put(identifier, new AtomicReference<>());
    CreateTableOperation createOperation = new CreateTableOperation(identifier, TableDescriptor.forManaged().schema(schema).option("a", "Test").build().toCatalogTable(), ignoreIfExists, isTemporary);
    tEnv.executeInternal(createOperation);
    // test ignore: create again
    if (ignoreIfExists) {
        tEnv.executeInternal(createOperation);
    } else {
        assertThatThrownBy(() -> tEnv.executeInternal(createOperation), isTemporary ? "already exists" : "Could not execute CreateTable");
    }
    // lookup table
    boolean isInCatalog = tEnv.getCatalog(catalog).orElseThrow(AssertionError::new).tableExists(new ObjectPath(database, tableName));
    if (isTemporary) {
        assertThat(isInCatalog).isFalse();
    } else {
        assertThat(isInCatalog).isTrue();
    }
    final Optional<ContextResolvedTable> lookupResult = tEnv.getCatalogManager().getTable(identifier);
    assertThat(lookupResult.isPresent()).isTrue();
    final CatalogBaseTable catalogTable = lookupResult.get().getTable();
    assertThat(catalogTable instanceof CatalogTable).isTrue();
    assertThat(catalogTable.getUnresolvedSchema()).isEqualTo(schema);
    assertThat(catalogTable.getOptions().get("a")).isEqualTo("Test");
    assertThat(catalogTable.getOptions().get(ENRICHED_KEY)).isEqualTo(ENRICHED_VALUE);
    AtomicReference<Map<String, String>> reference = MANAGED_TABLES.get(identifier);
    assertThat(reference.get()).isNotNull();
    assertThat(reference.get().get("a")).isEqualTo("Test");
    assertThat(reference.get().get(ENRICHED_KEY)).isEqualTo(ENRICHED_VALUE);
    DropTableOperation dropOperation = new DropTableOperation(identifier, ignoreIfExists, isTemporary);
    tEnv.executeInternal(dropOperation);
    assertThat(MANAGED_TABLES.get(identifier).get()).isNull();
    // test ignore: drop again
    if (ignoreIfExists) {
        tEnv.executeInternal(dropOperation);
    } else {
        assertThatThrownBy(() -> tEnv.executeInternal(dropOperation), "does not exist");
    }
    MANAGED_TABLES.remove(identifier);
}
Also used : ObjectPath(org.apache.flink.table.catalog.ObjectPath) CatalogBaseTable(org.apache.flink.table.catalog.CatalogBaseTable) CreateTableOperation(org.apache.flink.table.operations.ddl.CreateTableOperation) CatalogTable(org.apache.flink.table.catalog.CatalogTable) DropTableOperation(org.apache.flink.table.operations.ddl.DropTableOperation) ContextResolvedTable(org.apache.flink.table.catalog.ContextResolvedTable) TableEnvironmentMock(org.apache.flink.table.utils.TableEnvironmentMock) Map(java.util.Map) ObjectIdentifier(org.apache.flink.table.catalog.ObjectIdentifier)

Example 10 with CreateTableOperation

use of org.apache.flink.table.operations.ddl.CreateTableOperation in project zeppelin by apache.

the class Flink113Shims method parseBySqlParser.

private SqlCommandCall parseBySqlParser(Parser sqlParser, String stmt) throws Exception {
    List<Operation> operations;
    try {
        operations = sqlParser.parse(stmt);
    } catch (Throwable e) {
        throw new Exception("Invalidate SQL statement.", e);
    }
    if (operations.size() != 1) {
        throw new Exception("Only single statement is supported now.");
    }
    final SqlCommand cmd;
    String[] operands = new String[] { stmt };
    Operation operation = operations.get(0);
    if (operation instanceof CatalogSinkModifyOperation) {
        boolean overwrite = ((CatalogSinkModifyOperation) operation).isOverwrite();
        cmd = overwrite ? SqlCommand.INSERT_OVERWRITE : SqlCommand.INSERT_INTO;
    } else if (operation instanceof CreateTableOperation) {
        cmd = SqlCommand.CREATE_TABLE;
    } else if (operation instanceof DropTableOperation) {
        cmd = SqlCommand.DROP_TABLE;
    } else if (operation instanceof AlterTableOperation) {
        cmd = SqlCommand.ALTER_TABLE;
    } else if (operation instanceof CreateViewOperation) {
        cmd = SqlCommand.CREATE_VIEW;
    } else if (operation instanceof DropViewOperation) {
        cmd = SqlCommand.DROP_VIEW;
    } else if (operation instanceof CreateDatabaseOperation) {
        cmd = SqlCommand.CREATE_DATABASE;
    } else if (operation instanceof DropDatabaseOperation) {
        cmd = SqlCommand.DROP_DATABASE;
    } else if (operation instanceof AlterDatabaseOperation) {
        cmd = SqlCommand.ALTER_DATABASE;
    } else if (operation instanceof CreateCatalogOperation) {
        cmd = SqlCommand.CREATE_CATALOG;
    } else if (operation instanceof DropCatalogOperation) {
        cmd = SqlCommand.DROP_CATALOG;
    } else if (operation instanceof UseCatalogOperation) {
        cmd = SqlCommand.USE_CATALOG;
        operands = new String[] { ((UseCatalogOperation) operation).getCatalogName() };
    } else if (operation instanceof UseDatabaseOperation) {
        cmd = SqlCommand.USE;
        operands = new String[] { ((UseDatabaseOperation) operation).getDatabaseName() };
    } else if (operation instanceof ShowCatalogsOperation) {
        cmd = SqlCommand.SHOW_CATALOGS;
        operands = new String[0];
    } else if (operation instanceof ShowDatabasesOperation) {
        cmd = SqlCommand.SHOW_DATABASES;
        operands = new String[0];
    } else if (operation instanceof ShowTablesOperation) {
        cmd = SqlCommand.SHOW_TABLES;
        operands = new String[0];
    } else if (operation instanceof ShowFunctionsOperation) {
        cmd = SqlCommand.SHOW_FUNCTIONS;
        operands = new String[0];
    } else if (operation instanceof CreateCatalogFunctionOperation || operation instanceof CreateTempSystemFunctionOperation) {
        cmd = SqlCommand.CREATE_FUNCTION;
    } else if (operation instanceof DropCatalogFunctionOperation || operation instanceof DropTempSystemFunctionOperation) {
        cmd = SqlCommand.DROP_FUNCTION;
    } else if (operation instanceof AlterCatalogFunctionOperation) {
        cmd = SqlCommand.ALTER_FUNCTION;
    } else if (operation instanceof ExplainOperation) {
        cmd = SqlCommand.EXPLAIN;
    } else if (operation instanceof DescribeTableOperation) {
        cmd = SqlCommand.DESCRIBE;
        operands = new String[] { ((DescribeTableOperation) operation).getSqlIdentifier().asSerializableString() };
    } else if (operation instanceof QueryOperation) {
        cmd = SqlCommand.SELECT;
    } else {
        throw new Exception("Unknown operation: " + operation.asSummaryString());
    }
    return new SqlCommandCall(cmd, operands, stmt);
}
Also used : DropTempSystemFunctionOperation(org.apache.flink.table.operations.ddl.DropTempSystemFunctionOperation) AlterDatabaseOperation(org.apache.flink.table.operations.ddl.AlterDatabaseOperation) SqlCommandCall(org.apache.zeppelin.flink.sql.SqlCommandParser.SqlCommandCall) CreateCatalogOperation(org.apache.flink.table.operations.ddl.CreateCatalogOperation) DropCatalogFunctionOperation(org.apache.flink.table.operations.ddl.DropCatalogFunctionOperation) DropDatabaseOperation(org.apache.flink.table.operations.ddl.DropDatabaseOperation) CreateCatalogOperation(org.apache.flink.table.operations.ddl.CreateCatalogOperation) UseCatalogOperation(org.apache.flink.table.operations.UseCatalogOperation) UseDatabaseOperation(org.apache.flink.table.operations.UseDatabaseOperation) ShowCatalogsOperation(org.apache.flink.table.operations.ShowCatalogsOperation) CreateViewOperation(org.apache.flink.table.operations.ddl.CreateViewOperation) AlterDatabaseOperation(org.apache.flink.table.operations.ddl.AlterDatabaseOperation) QueryOperation(org.apache.flink.table.operations.QueryOperation) DropCatalogFunctionOperation(org.apache.flink.table.operations.ddl.DropCatalogFunctionOperation) ShowTablesOperation(org.apache.flink.table.operations.ShowTablesOperation) DescribeTableOperation(org.apache.flink.table.operations.DescribeTableOperation) AlterTableOperation(org.apache.flink.table.operations.ddl.AlterTableOperation) ShowFunctionsOperation(org.apache.flink.table.operations.ShowFunctionsOperation) CreateDatabaseOperation(org.apache.flink.table.operations.ddl.CreateDatabaseOperation) CatalogSinkModifyOperation(org.apache.flink.table.operations.CatalogSinkModifyOperation) Operation(org.apache.flink.table.operations.Operation) AlterCatalogFunctionOperation(org.apache.flink.table.operations.ddl.AlterCatalogFunctionOperation) DropTempSystemFunctionOperation(org.apache.flink.table.operations.ddl.DropTempSystemFunctionOperation) ShowDatabasesOperation(org.apache.flink.table.operations.ShowDatabasesOperation) DropTableOperation(org.apache.flink.table.operations.ddl.DropTableOperation) CreateTableOperation(org.apache.flink.table.operations.ddl.CreateTableOperation) DropViewOperation(org.apache.flink.table.operations.ddl.DropViewOperation) ExplainOperation(org.apache.flink.table.operations.ExplainOperation) DropCatalogOperation(org.apache.flink.table.operations.ddl.DropCatalogOperation) CreateCatalogFunctionOperation(org.apache.flink.table.operations.ddl.CreateCatalogFunctionOperation) CreateTempSystemFunctionOperation(org.apache.flink.table.operations.ddl.CreateTempSystemFunctionOperation) AttributedString(org.jline.utils.AttributedString) CreateTableOperation(org.apache.flink.table.operations.ddl.CreateTableOperation) CreateCatalogFunctionOperation(org.apache.flink.table.operations.ddl.CreateCatalogFunctionOperation) AlterCatalogFunctionOperation(org.apache.flink.table.operations.ddl.AlterCatalogFunctionOperation) CreateViewOperation(org.apache.flink.table.operations.ddl.CreateViewOperation) UseCatalogOperation(org.apache.flink.table.operations.UseCatalogOperation) CreateTempSystemFunctionOperation(org.apache.flink.table.operations.ddl.CreateTempSystemFunctionOperation) SqlCommand(org.apache.zeppelin.flink.sql.SqlCommandParser.SqlCommand) QueryOperation(org.apache.flink.table.operations.QueryOperation) ExplainOperation(org.apache.flink.table.operations.ExplainOperation) ShowCatalogsOperation(org.apache.flink.table.operations.ShowCatalogsOperation) DropCatalogOperation(org.apache.flink.table.operations.ddl.DropCatalogOperation) DropDatabaseOperation(org.apache.flink.table.operations.ddl.DropDatabaseOperation) CatalogSinkModifyOperation(org.apache.flink.table.operations.CatalogSinkModifyOperation) DescribeTableOperation(org.apache.flink.table.operations.DescribeTableOperation) UseDatabaseOperation(org.apache.flink.table.operations.UseDatabaseOperation) FlinkException(org.apache.flink.util.FlinkException) TableException(org.apache.flink.table.api.TableException) IOException(java.io.IOException) ShowFunctionsOperation(org.apache.flink.table.operations.ShowFunctionsOperation) AlterTableOperation(org.apache.flink.table.operations.ddl.AlterTableOperation) DropViewOperation(org.apache.flink.table.operations.ddl.DropViewOperation) DropTableOperation(org.apache.flink.table.operations.ddl.DropTableOperation) CreateDatabaseOperation(org.apache.flink.table.operations.ddl.CreateDatabaseOperation) ShowDatabasesOperation(org.apache.flink.table.operations.ShowDatabasesOperation) ShowTablesOperation(org.apache.flink.table.operations.ShowTablesOperation)

Aggregations

CreateTableOperation (org.apache.flink.table.operations.ddl.CreateTableOperation)15 QueryOperation (org.apache.flink.table.operations.QueryOperation)12 ExplainOperation (org.apache.flink.table.operations.ExplainOperation)11 Operation (org.apache.flink.table.operations.Operation)11 ShowFunctionsOperation (org.apache.flink.table.operations.ShowFunctionsOperation)11 UseCatalogOperation (org.apache.flink.table.operations.UseCatalogOperation)11 UseDatabaseOperation (org.apache.flink.table.operations.UseDatabaseOperation)11 AlterDatabaseOperation (org.apache.flink.table.operations.ddl.AlterDatabaseOperation)11 CreateDatabaseOperation (org.apache.flink.table.operations.ddl.CreateDatabaseOperation)11 CreateViewOperation (org.apache.flink.table.operations.ddl.CreateViewOperation)11 DropDatabaseOperation (org.apache.flink.table.operations.ddl.DropDatabaseOperation)11 CatalogTable (org.apache.flink.table.catalog.CatalogTable)10 LoadModuleOperation (org.apache.flink.table.operations.LoadModuleOperation)8 ShowModulesOperation (org.apache.flink.table.operations.ShowModulesOperation)8 SinkModifyOperation (org.apache.flink.table.operations.SinkModifyOperation)8 SourceQueryOperation (org.apache.flink.table.operations.SourceQueryOperation)8 StatementSetOperation (org.apache.flink.table.operations.StatementSetOperation)8 UnloadModuleOperation (org.apache.flink.table.operations.UnloadModuleOperation)8 UseModulesOperation (org.apache.flink.table.operations.UseModulesOperation)8 AlterTableAddConstraintOperation (org.apache.flink.table.operations.ddl.AlterTableAddConstraintOperation)8