Interface SupportsRowLevelDelete.RowLevelDeleteInfo

Enclosing interface:
SupportsRowLevelDelete

@PublicEvolving public static interface SupportsRowLevelDelete.RowLevelDeleteInfo
The information that guides the planner on how to rewrite the delete statement.
  • Method Details

    • requiredColumns

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

      default SupportsRowLevelDelete.RowLevelDeleteMode getRowLevelDeleteMode()
      Planner will rewrite delete statement to query base on the SupportsRowLevelDelete.RowLevelDeleteInfo, keeping the query of delete unchanged by default(in `DELETE_ROWS` mode), or changing the query to the complementary set in REMAINING_ROWS mode.

      Take the following SQL as an example:

      
       DELETE FROM t WHERE y = 2;
       

      If returns SupportsRowLevelDelete.RowLevelDeleteMode.DELETED_ROWS, the sink will get the rows to be deleted which match the filter [y = 2].

      If returns SupportsRowLevelDelete.RowLevelDeleteMode.REMAINING_ROWS, the sink will get the rows which don't match the filter [y = 2].

      Note: All rows will be of RowKind#DELETE when RowLevelDeleteMode is DELETED_ROWS, and RowKind#INSERT when RowLevelDeleteMode is REMAINING_ROWS.