public final class RuleAssignOutputElements extends Object implements OptimizerRule
This rule is responsible for assigning the output elements to every node in the plan. The output elements define the columns that are returned from every node. This is generally done by figuring out top-down all the elements required to execute the operation at each node and making sure those elements are selected from the children nodes.
Constructor and Description |
---|
RuleAssignOutputElements(boolean finalRun) |
Modifier and Type | Method and Description |
---|---|
PlanNode |
execute(PlanNode plan,
QueryMetadataInterface metadata,
CapabilitiesFinder capFinder,
RuleStack rules,
AnalysisRecord analysisRecord,
CommandContext context)
Execute the rule.
|
static String |
findFunctionTarget(Function function,
FunctionDescriptor fd,
CapabilitiesFinder capabiltiesFinder,
QueryMetadataInterface metadata)
Find the first schema name against which this function can be executed, or null for no target
|
static Set<WindowFunction> |
getWindowFunctions(List<Expression> projectCols) |
String |
toString()
Get name of the rule
|
public PlanNode execute(PlanNode plan, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, RuleStack rules, AnalysisRecord analysisRecord, CommandContext context) throws QueryPlannerException, QueryMetadataException, TeiidComponentException
execute
in interface OptimizerRule
plan
- The plan to execute rule onmetadata
- The metadata interfacerules
- The rule stack, not modifiedQueryPlannerException
QueryMetadataException
TeiidComponentException
public static Set<WindowFunction> getWindowFunctions(List<Expression> projectCols)
public static String findFunctionTarget(Function function, FunctionDescriptor fd, CapabilitiesFinder capabiltiesFinder, QueryMetadataInterface metadata) throws TeiidComponentException, QueryMetadataException
function
- fd
- capabiltiesFinder
- metadata
- TeiidComponentException
QueryMetadataException
Copyright © 2019. All rights reserved.