Class RemoveRedundantTableFunction

java.lang.Object
io.trino.sql.planner.iterative.rule.RemoveRedundantTableFunction
All Implemented Interfaces:
Rule<TableFunctionProcessorNode>

public class RemoveRedundantTableFunction extends Object implements Rule<TableFunctionProcessorNode>
Table function can take multiple table arguments. Each argument is either "prune when empty" or "keep when empty". "Prune when empty" means that if this argument has no rows, the function result is empty, so the function can be removed from the plan, and replaced with empty values. "Keep when empty" means that even if the argument has no rows, the function should still be executed, and it can return a non-empty result. All the table arguments are combined into a single source of a TableFunctionProcessorNode. If either argument is "prune when empty", the overall result is "prune when empty". This rule removes a redundant TableFunctionProcessorNode based on the "prune when empty" property.