@PublicEvolving public interface SupportsDeletePushDown
WHEREclause in delete statement to
DynamicTableSink. The table sink can delete existing data directly according to the filters.
Flink will get the filters in conjunctive form and push down the filters into sink by calling
applyDeleteFilters(List) in the planning phase. If it returns true, Flink will
executeDeletion() to execute the actual deletion during execution phase.
Given the following SQL:
DELETE FROM t WHERE (a = '1' OR a = '2') AND b IS NOT NULL;*
In the example above, the
WHERE clause will be decomposed into two filters
[a = '1' OR a = '2']
[b IS NOT NULL]
If the sink can accept both filters which means the sink can delete data directly according to
applyDeleteFilters(List) should return true. Otherwise, it should return
Note: For the cases where the filter expression is not available, e.g., sub-query or
applyDeleteFilters(List) returns false, if the sink implements
Flink will try to rewrite the delete statement and produce row-level changes, see
SupportsRowLevelDelete for more details. Otherwise, Flink will throw
|Modifier and Type||Method and Description|
Provides a list of filters specified by
Deletes data during execution phase.
boolean applyDeleteFilters(List<ResolvedExpression> filters)
WHEREclause in conjunctive form and return the acceptance status to planner during planning phase.
filters- a list of resolved filter expressions.
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.