Class StatementSetImpl<E extends TableEnvironmentInternal>
- java.lang.Object
-
- org.apache.flink.table.api.internal.StatementSetImpl<E>
-
- All Implemented Interfaces:
Compilable,Executable,Explainable<StatementSet>,StatementSet
@Internal public class StatementSetImpl<E extends TableEnvironmentInternal> extends Object implements StatementSet
Implementation forStatementSet.
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ModifyOperation>operationsprotected EtableEnvironment
-
Constructor Summary
Constructors Modifier Constructor Description protectedStatementSetImpl(E tableEnvironment)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StatementSetadd(TablePipeline tablePipeline)Adds aTablePipeline.StatementSetaddInsert(String targetPath, Table table)Shorthand forstatementSet.add(table.insertInto(targetPath)).StatementSetaddInsert(String targetPath, Table table, boolean overwrite)Shorthand forstatementSet.add(table.insertInto(targetPath, overwrite)).StatementSetaddInsert(TableDescriptor targetDescriptor, Table table)Shorthand forstatementSet.add(table.insertInto(targetDescriptor)).StatementSetaddInsert(TableDescriptor targetDescriptor, Table table, boolean overwrite)Shorthand forstatementSet.add(table.insertInto(targetDescriptor, overwrite)).StatementSetaddInsertSql(String statement)Adds anINSERT INTOSQL statement.CompiledPlancompilePlan()Compiles this object into aCompiledPlanthat can be executed as one job.TableResultexecute()Executes this object.Stringexplain(ExplainFormat format, ExplainDetail... extraDetails)Returns the AST of this object and the execution plan to compute the result of the given statement.List<ModifyOperation>getOperations()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.flink.table.api.Explainable
explain, printExplain
-
-
-
-
Field Detail
-
tableEnvironment
protected final E extends TableEnvironmentInternal tableEnvironment
-
operations
protected final List<ModifyOperation> operations
-
-
Constructor Detail
-
StatementSetImpl
protected StatementSetImpl(E tableEnvironment)
-
-
Method Detail
-
getOperations
@VisibleForTesting public List<ModifyOperation> getOperations()
-
add
public StatementSet add(TablePipeline tablePipeline)
Description copied from interface:StatementSetAdds aTablePipeline.- Specified by:
addin interfaceStatementSet
-
addInsertSql
public StatementSet addInsertSql(String statement)
Description copied from interface:StatementSetAdds anINSERT INTOSQL statement.- Specified by:
addInsertSqlin interfaceStatementSet
-
addInsert
public StatementSet addInsert(String targetPath, Table table)
Description copied from interface:StatementSetShorthand forstatementSet.add(table.insertInto(targetPath)).- Specified by:
addInsertin interfaceStatementSet- See Also:
StatementSet.add(TablePipeline),Table.insertInto(String)
-
addInsert
public StatementSet addInsert(String targetPath, Table table, boolean overwrite)
Description copied from interface:StatementSetShorthand forstatementSet.add(table.insertInto(targetPath, overwrite)).- Specified by:
addInsertin interfaceStatementSet- See Also:
StatementSet.add(TablePipeline),Table.insertInto(String, boolean)
-
addInsert
public StatementSet addInsert(TableDescriptor targetDescriptor, Table table)
Description copied from interface:StatementSetShorthand forstatementSet.add(table.insertInto(targetDescriptor)).- Specified by:
addInsertin interfaceStatementSet- See Also:
StatementSet.add(TablePipeline),Table.insertInto(TableDescriptor)
-
addInsert
public StatementSet addInsert(TableDescriptor targetDescriptor, Table table, boolean overwrite)
Description copied from interface:StatementSetShorthand forstatementSet.add(table.insertInto(targetDescriptor, overwrite)).- Specified by:
addInsertin interfaceStatementSet- See Also:
StatementSet.add(TablePipeline),Table.insertInto(TableDescriptor, boolean)
-
explain
public String explain(ExplainFormat format, ExplainDetail... extraDetails)
Description copied from interface:ExplainableReturns the AST of this object and the execution plan to compute the result of the given statement.- Specified by:
explainin interfaceExplainable<E extends TableEnvironmentInternal>- Parameters:
format- The output format of explained planextraDetails- The extra explain details which the result of this method should include, e.g. estimated cost, changelog mode for streaming- Returns:
- AST and the execution plan.
-
execute
public TableResult execute()
Description copied from interface:StatementSetExecutes this object.By default, all DML operations are executed asynchronously. Use
TableResult.await()orTableResult.getJobClient()to monitor the execution. SetTableConfigOptions.TABLE_DML_SYNCfor always synchronous execution.This method executes all statements as one job.
The added statements will be cleared after calling this method.
- Specified by:
executein interfaceExecutable- Specified by:
executein interfaceStatementSet
-
compilePlan
@Experimental public CompiledPlan compilePlan()
Description copied from interface:StatementSetCompiles this object into aCompiledPlanthat can be executed as one job.Compiled plans can be persisted and reloaded across Flink versions. They describe static pipelines to ensure backwards compatibility and enable stateful streaming job upgrades. See
CompiledPlanand the website documentation for more information.Note: The compiled plan feature is not supported in batch mode.
This method compiles all statements into a
CompiledPlanthat can be executed as one job.- Specified by:
compilePlanin interfaceCompilable- Specified by:
compilePlanin interfaceStatementSet
-
-