@PublicEvolving public interface SupportsRowLevelModificationScan
ScanTableSource
s that support the row-level modification. The table source
is responsible for returning the information described by RowLevelModificationScanContext
. The context will be propagated to the sink which implements
SupportsRowLevelUpdate
or SupportsRowLevelDelete
.
Note: This interface is optional for table sources to implement. For cases where the table
source neither needs to know the type of row-level modification nor propagate information to
sink, the table source doesn't need to implement this interface. See more details at applyRowLevelModificationScan(RowLevelModificationType, RowLevelModificationScanContext)
.
Modifier and Type | Interface and Description |
---|---|
static class |
SupportsRowLevelModificationScan.RowLevelModificationType
Type of the row-level modification for table.
|
Modifier and Type | Method and Description |
---|---|
RowLevelModificationScanContext |
applyRowLevelModificationScan(SupportsRowLevelModificationScan.RowLevelModificationType rowLevelModificationType,
RowLevelModificationScanContext previousContext)
Applies the type of row-level modification and the previous
RowLevelModificationScanContext returned by previous table source scan, return a new RowLevelModificationScanContext . |
RowLevelModificationScanContext applyRowLevelModificationScan(SupportsRowLevelModificationScan.RowLevelModificationType rowLevelModificationType, @Nullable RowLevelModificationScanContext previousContext)
RowLevelModificationScanContext
returned by previous table source scan, return a new RowLevelModificationScanContext
. If the table source is the last one, the RowLevelModificationScanContext
will be passed to the table sink. Otherwise, it will be
passed to the following table source.
Note: For the all tables in the UPDATE/DELETE statement, this method will be involved for the corresponding table source scan.
Note: It may have multiple table sources in the case of sub-query. In such case, it will
return multiple RowLevelModificationScanContext
s. To handle such case, the planner
will also pass the previous RowLevelModificationScanContext
to the current table
source scan which is expected to decide what to do with the previous RowLevelModificationScanContext
. The order is consistent with the compilation order of the
table sources. The planer will only pass the last context returned to the sink.
previousContext
- the context returned by previous table source, if there's no previous
context, it'll be null.Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.