Class StagedSinkModifyOperation
java.lang.Object
org.apache.flink.table.operations.SinkModifyOperation
org.apache.flink.table.operations.StagedSinkModifyOperation
- All Implemented Interfaces:
ModifyOperation,Operation
DML operation that tells to write to a sink which implements
SupportsStaging. Currently.
this operation is for CTAS(CREATE TABLE AS SELECT) and RTAS([CREATE OR] REPLACE TABLE AS SELECT)
statement.
StagedSinkModifyOperation is an extension of SinkModifyOperation in the atomic CTAS/RTAS
scenario. Whiling checking whether the corresponding sink support atomic CTAS/RTAS or not, we
will need to get DynamicTableSink firstly and check whether it implements SupportsStaging
and then call the method SupportsStaging.applyStaging(org.apache.flink.table.connector.sink.abilities.SupportsStaging.StagingContext). We maintain the DynamicTableSink
in this operation so that we can reuse this DynamicTableSink instead of creating a new
DynamicTableSink during translating the operation again which is error-prone.
-
Field Summary
Fields inherited from class org.apache.flink.table.operations.SinkModifyOperation
contextResolvedTable -
Constructor Summary
ConstructorsConstructorDescriptionStagedSinkModifyOperation(ContextResolvedTable contextResolvedTable, QueryOperation child, Map<String, String> staticPartitions, int[][] targetColumns, boolean overwrite, Map<String, String> dynamicOptions, org.apache.flink.table.connector.sink.DynamicTableSink dynamicTableSink) StagedSinkModifyOperation(ContextResolvedTable contextResolvedTable, QueryOperation child, Map<String, String> staticPartitions, int[][] targetColumns, boolean overwrite, Map<String, String> dynamicOptions, ModifyType modifyType, org.apache.flink.table.connector.sink.DynamicTableSink dynamicTableSink) -
Method Summary
Modifier and TypeMethodDescriptionorg.apache.flink.table.connector.sink.DynamicTableSinkMethods inherited from class org.apache.flink.table.operations.SinkModifyOperation
accept, asSummaryString, getChild, getContextResolvedTable, getDynamicOptions, getStaticPartitions, getTargetColumns, isDelete, isOverwrite, isUpdate
-
Constructor Details
-
StagedSinkModifyOperation
public StagedSinkModifyOperation(ContextResolvedTable contextResolvedTable, QueryOperation child, Map<String, String> staticPartitions, int[][] targetColumns, boolean overwrite, Map<String, String> dynamicOptions, org.apache.flink.table.connector.sink.DynamicTableSink dynamicTableSink) -
StagedSinkModifyOperation
public StagedSinkModifyOperation(ContextResolvedTable contextResolvedTable, QueryOperation child, Map<String, String> staticPartitions, @Nullable int[][] targetColumns, boolean overwrite, Map<String, String> dynamicOptions, ModifyType modifyType, org.apache.flink.table.connector.sink.DynamicTableSink dynamicTableSink)
-
-
Method Details
-
getDynamicTableSink
public org.apache.flink.table.connector.sink.DynamicTableSink getDynamicTableSink()
-