Class StagedSinkModifyOperation

  • All Implemented Interfaces:
    ModifyOperation, Operation

    @Internal
    public class StagedSinkModifyOperation
    extends SinkModifyOperation
    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.

    • Constructor Detail

      • 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)
    • Method Detail

      • getDynamicTableSink

        public org.apache.flink.table.connector.sink.DynamicTableSink getDynamicTableSink()