@Internal public class StagedSinkModifyOperation extends SinkModifyOperation
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.
SinkModifyOperation.ModifyType
contextResolvedTable
Constructor and Description |
---|
StagedSinkModifyOperation(ContextResolvedTable contextResolvedTable,
QueryOperation child,
Map<String,String> staticPartitions,
int[][] targetColumns,
boolean overwrite,
Map<String,String> dynamicOptions,
DynamicTableSink dynamicTableSink) |
StagedSinkModifyOperation(ContextResolvedTable contextResolvedTable,
QueryOperation child,
Map<String,String> staticPartitions,
int[][] targetColumns,
boolean overwrite,
Map<String,String> dynamicOptions,
SinkModifyOperation.ModifyType modifyType,
DynamicTableSink dynamicTableSink) |
Modifier and Type | Method and Description |
---|---|
DynamicTableSink |
getDynamicTableSink() |
accept, asSummaryString, getChild, getContextResolvedTable, getDynamicOptions, getStaticPartitions, getTargetColumns, isDelete, isOverwrite, isUpdate
public StagedSinkModifyOperation(ContextResolvedTable contextResolvedTable, QueryOperation child, Map<String,String> staticPartitions, int[][] targetColumns, boolean overwrite, Map<String,String> dynamicOptions, DynamicTableSink dynamicTableSink)
public StagedSinkModifyOperation(ContextResolvedTable contextResolvedTable, QueryOperation child, Map<String,String> staticPartitions, @Nullable int[][] targetColumns, boolean overwrite, Map<String,String> dynamicOptions, SinkModifyOperation.ModifyType modifyType, DynamicTableSink dynamicTableSink)
public DynamicTableSink getDynamicTableSink()
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.