Class RemoveEmptyTableExecute
- java.lang.Object
-
- io.trino.sql.planner.iterative.rule.RemoveEmptyTableExecute
-
- All Implemented Interfaces:
Rule<TableFinishNode>
public class RemoveEmptyTableExecute extends Object implements Rule<TableFinishNode>
If the predicate for a table execute is optimized to false, the target table scan of table execute 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 - (optional) Exchange - TableExecute - (optional) Exchange - empty Valuesinto- Values (null)
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result
-
-
Constructor Summary
Constructors Constructor Description RemoveEmptyTableExecute()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Rule.Resultapply(TableFinishNode finishNode, 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 finishNode, Captures captures, Rule.Context context)
- Specified by:
applyin interfaceRule<TableFinishNode>
-
-