@Internal public class StatementSetImpl<E extends TableEnvironmentInternal> extends Object implements StatementSet
StatementSet.| Modifier and Type | Field and Description |
|---|---|
protected List<ModifyOperation> |
operations |
protected E |
tableEnvironment |
| Modifier | Constructor and Description |
|---|---|
protected |
StatementSetImpl(E tableEnvironment) |
| Modifier and Type | Method and Description |
|---|---|
StatementSet |
add(TablePipeline tablePipeline)
Adds a
TablePipeline. |
StatementSet |
addInsert(String targetPath,
Table table)
Shorthand for
statementSet.add(table.insertInto(targetPath)). |
StatementSet |
addInsert(String targetPath,
Table table,
boolean overwrite)
Shorthand for
statementSet.add(table.insertInto(targetPath, overwrite)). |
StatementSet |
addInsert(TableDescriptor targetDescriptor,
Table table)
Shorthand for
statementSet.add(table.insertInto(targetDescriptor)). |
StatementSet |
addInsert(TableDescriptor targetDescriptor,
Table table,
boolean overwrite)
Shorthand for
statementSet.add(table.insertInto(targetDescriptor, overwrite)). |
StatementSet |
addInsertSql(String statement)
Adds an
INSERT INTO SQL statement. |
CompiledPlan |
compilePlan()
Compiles this object into a
CompiledPlan that can be executed as one job. |
TableResult |
execute()
Executes this object.
|
String |
explain(ExplainDetail... extraDetails)
Returns the AST of this object and the execution plan to compute the result of the given
statement.
|
List<ModifyOperation> |
getOperations() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprintExplainprotected final E extends TableEnvironmentInternal tableEnvironment
protected final List<ModifyOperation> operations
protected StatementSetImpl(E tableEnvironment)
@VisibleForTesting public List<ModifyOperation> getOperations()
public StatementSet add(TablePipeline tablePipeline)
StatementSetTablePipeline.add in interface StatementSetpublic StatementSet addInsertSql(String statement)
StatementSetINSERT INTO SQL statement.addInsertSql in interface StatementSetpublic StatementSet addInsert(String targetPath, Table table)
StatementSetstatementSet.add(table.insertInto(targetPath)).addInsert in interface StatementSetStatementSet.add(TablePipeline),
Table.insertInto(String)public StatementSet addInsert(String targetPath, Table table, boolean overwrite)
StatementSetstatementSet.add(table.insertInto(targetPath, overwrite)).addInsert in interface StatementSetStatementSet.add(TablePipeline),
Table.insertInto(String, boolean)public StatementSet addInsert(TableDescriptor targetDescriptor, Table table)
StatementSetstatementSet.add(table.insertInto(targetDescriptor)).addInsert in interface StatementSetStatementSet.add(TablePipeline),
Table.insertInto(TableDescriptor)public StatementSet addInsert(TableDescriptor targetDescriptor, Table table, boolean overwrite)
StatementSetstatementSet.add(table.insertInto(targetDescriptor, overwrite)).addInsert in interface StatementSetStatementSet.add(TablePipeline),
Table.insertInto(TableDescriptor, boolean)public String explain(ExplainDetail... extraDetails)
Explainableexplain in interface Explainable<StatementSet>extraDetails - The extra explain details which the result of this method should include,
e.g. estimated cost, changelog mode for streamingpublic TableResult execute()
StatementSetBy default, all DML operations are executed asynchronously. Use TableResult.await() or TableResult.getJobClient() to monitor the execution. Set
TableConfigOptions.TABLE_DML_SYNC for always synchronous execution.
This method executes all statements as one job.
The added statements will be cleared after calling this method.
execute in interface Executableexecute in interface StatementSet@Experimental public CompiledPlan compilePlan()
StatementSetCompiledPlan that 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
CompiledPlan and the website documentation for more information.
Note: The compiled plan feature is not supported in batch mode.
This method compiles all statements into a CompiledPlan that can be executed as
one job.
compilePlan in interface CompilablecompilePlan in interface StatementSetCopyright © 2014–2023 The Apache Software Foundation. All rights reserved.