Interface SupportsRowLevelUpdate.RowLevelUpdateInfo

Enclosing interface:
SupportsRowLevelUpdate

@PublicEvolving public static interface SupportsRowLevelUpdate.RowLevelUpdateInfo
The information that guides the planner on how to rewrite the update statement.
  • Method Details

    • requiredColumns

      default Optional<List<Column>> requiredColumns()
      The required columns by the sink to perform row-level update. The rows consumed by sink will contain the required columns in order. If return Optional.empty(), it will contain all columns.
    • getRowLevelUpdateMode

      default SupportsRowLevelUpdate.RowLevelUpdateMode getRowLevelUpdateMode()
      Planner will rewrite the update statement to query base on the SupportsRowLevelUpdate.RowLevelUpdateMode, keeping the query of update unchanged by default(in `UPDATED_ROWS` mode), or changing the query to union the updated rows and the other rows (in `ALL_ROWS` mode).

      Take the following SQL as an example:

      
       UPDATE t SET x = 1 WHERE y = 2;
       

      If returns SupportsRowLevelUpdate.RowLevelUpdateMode.UPDATED_ROWS, the sink will get the update after rows which match the filter [y = 2].

      If returns SupportsRowLevelUpdate.RowLevelUpdateMode.ALL_ROWS, the sink will get both the update after rows which match the filter [y = 2] and the other rows that don't match the filter [y = 2].

      Note: All rows will have RowKind#UPDATE_AFTER when RowLevelUpdateMode is UPDATED_ROWS, and RowKind#INSERT when RowLevelUpdateMode is ALL_ROWS.