Interface SupportsRowLevelModificationScan
ScanTableSources 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).
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumType of the row-level modification for table. -
Method Summary
Modifier and TypeMethodDescriptionapplyRowLevelModificationScan(SupportsRowLevelModificationScan.RowLevelModificationType rowLevelModificationType, RowLevelModificationScanContext previousContext) Applies the type of row-level modification and the previousRowLevelModificationScanContextreturned by previous table source scan, return a newRowLevelModificationScanContext.
-
Method Details
-
applyRowLevelModificationScan
RowLevelModificationScanContext applyRowLevelModificationScan(SupportsRowLevelModificationScan.RowLevelModificationType rowLevelModificationType, @Nullable RowLevelModificationScanContext previousContext) Applies the type of row-level modification and the previousRowLevelModificationScanContextreturned by previous table source scan, return a newRowLevelModificationScanContext. If the table source is the last one, theRowLevelModificationScanContextwill 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
RowLevelModificationScanContexts. To handle such case, the planner will also pass the previousRowLevelModificationScanContextto the current table source scan which is expected to decide what to do with the previousRowLevelModificationScanContext. The order is consistent with the compilation order of the table sources. The planer will only pass the last context returned to the sink.- Parameters:
previousContext- the context returned by previous table source, if there's no previous context, it'll be null.
-