Class RemoveEmptyTableExecute
java.lang.Object
io.trino.sql.planner.iterative.rule.RemoveEmptyTableExecute
- All Implemented Interfaces:
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 Values
into
- Values (null)
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.trino.sql.planner.iterative.Rule
Rule.Context, Rule.Result -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapply(TableFinishNode finishNode, Captures captures, Rule.Context context) Returns a pattern to which plan nodes this rule applies.
-
Constructor Details
-
RemoveEmptyTableExecute
public RemoveEmptyTableExecute()
-
-
Method Details
-
getPattern
Description copied from interface:RuleReturns a pattern to which plan nodes this rule applies.- Specified by:
getPatternin interfaceRule<TableFinishNode>
-
apply
- Specified by:
applyin interfaceRule<TableFinishNode>
-