Class RemoveEmptyDelete
- java.lang.Object
-
- io.trino.sql.planner.iterative.rule.RemoveEmptyDelete
-
- All Implemented Interfaces:
Rule<TableFinishNode>
public class RemoveEmptyDelete extends Object implements Rule<TableFinishNode>
If the predicate for a delete is optimized to false, the target table scan of the delete will be replaced with an empty values node. This type of plan cannot be executed and is meaningless anyway, so we replace the entire thing with a values node.Transforms
- TableFinish - Exchange - Delete - empty Valuesinto- Values (0)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description RemoveEmptyDelete()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Resultapply(TableFinishNode node, Captures captures, Rule.Context context)Pattern<TableFinishNode>getPattern()Returns a pattern to which plan nodes this rule applies.
-
-
-
Method Detail
-
getPattern
public Pattern<TableFinishNode> getPattern()
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<TableFinishNode>
-
apply
public Rule.Result apply(TableFinishNode node, Captures captures, Rule.Context context)
- Specified by:
applyin interfaceRule<TableFinishNode>
-
-