@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(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() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
explain, printExplain
protected final E extends TableEnvironmentInternal tableEnvironment
protected final List<ModifyOperation> operations
protected StatementSetImpl(E tableEnvironment)
@VisibleForTesting public List<ModifyOperation> getOperations()
public StatementSet add(TablePipeline tablePipeline)
StatementSet
TablePipeline
.add
in interface StatementSet
public StatementSet addInsertSql(String statement)
StatementSet
INSERT INTO
SQL statement.addInsertSql
in interface StatementSet
public StatementSet addInsert(String targetPath, Table table)
StatementSet
statementSet.add(table.insertInto(targetPath))
.addInsert
in interface StatementSet
StatementSet.add(TablePipeline)
,
Table.insertInto(String)
public StatementSet addInsert(String targetPath, Table table, boolean overwrite)
StatementSet
statementSet.add(table.insertInto(targetPath, overwrite))
.addInsert
in interface StatementSet
StatementSet.add(TablePipeline)
,
Table.insertInto(String, boolean)
public StatementSet addInsert(TableDescriptor targetDescriptor, Table table)
StatementSet
statementSet.add(table.insertInto(targetDescriptor))
.addInsert
in interface StatementSet
StatementSet.add(TablePipeline)
,
Table.insertInto(TableDescriptor)
public StatementSet addInsert(TableDescriptor targetDescriptor, Table table, boolean overwrite)
StatementSet
statementSet.add(table.insertInto(targetDescriptor, overwrite))
.addInsert
in interface StatementSet
StatementSet.add(TablePipeline)
,
Table.insertInto(TableDescriptor, boolean)
public String explain(ExplainFormat format, ExplainDetail... extraDetails)
Explainable
explain
in interface Explainable<StatementSet>
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 streamingpublic TableResult execute()
StatementSet
By 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 Executable
execute
in interface StatementSet
@Experimental public CompiledPlan compilePlan()
StatementSet
CompiledPlan
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 Compilable
compilePlan
in interface StatementSet
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.