Modifier and Type | Class and Description |
---|---|
protected static class |
PlanUtil.AbsentColumn |
static class |
PlanUtil.ColumnMapping
Defines how the view columns are mapped (or resolved) into the columns from the source tables.
|
static class |
PlanUtil.RequiredColumnVisitor |
Constructor and Description |
---|
PlanUtil() |
public static List<Column> findRequiredColumns(QueryContext context, PlanNode planNode)
PlanNode.Type.PROJECT
node, and if so immediately
returns that node's list of projected columns
. Otherwise, this method finds all of the
PlanNode.Type.SOURCE
nodes below the supplied plan node, and accumulates the set of sources for which the columns are to be
found. The method then walks up the plan, looking for references to columns of the supplied table, starting with the
supplied node and walking up until a PROJECT
node is found or the top of the plan is reached.
The resulting column list will always contain at the front the columns
from the nearest
PROJECT ancestor, followed by any columns required by criteria. This is done so that the processing of the nearest PROJECT
ancestor node can simply use the sublist of each tuple.
context
- the query context; may not be nullplanNode
- the plan node at which the required columns need to be found; may not be nullColumn
objects that are used in the plan; never null but possibly empty if no columns are
actually neededpublic static List<String> findRequiredColumnTypes(QueryContext context, List<Column> columns, PlanNode node)
public static void replaceReferencesToRemovedSource(QueryContext context, PlanNode planNode, Map<SelectorName,SelectorName> rewrittenSelectors)
public static DynamicOperand replaceReferencesToRemovedSource(QueryContext context, DynamicOperand operand, Map<SelectorName,SelectorName> rewrittenSelectors)
public static Constraint replaceReferencesToRemovedSource(QueryContext context, Constraint constraint, Map<SelectorName,SelectorName> rewrittenSelectors)
public static JoinCondition replaceReferencesToRemovedSource(QueryContext context, JoinCondition joinCondition, Map<SelectorName,SelectorName> rewrittenSelectors)
public static void replaceViewReferences(QueryContext context, PlanNode topOfViewInPlan, PlanUtil.ColumnMapping mappings)
protected static void replaceViewReferences(QueryContext context, PlanNode node, PlanUtil.ColumnMapping mappings, SelectorName viewName, List<PlanNode> potentiallyRemovableSources)
public static Constraint replaceReferences(QueryContext context, Constraint constraint, PlanUtil.ColumnMapping mapping, PlanNode node)
public static DynamicOperand replaceViewReferences(QueryContext context, DynamicOperand operand, PlanUtil.ColumnMapping mapping, PlanNode node)
public static JoinCondition replaceViewReferences(QueryContext context, JoinCondition joinCondition, PlanUtil.ColumnMapping mapping, PlanNode node)
public static PlanUtil.ColumnMapping createMappingFor(Schemata.View view, PlanNode viewPlan)
public static PlanUtil.ColumnMapping createMappingForAliased(SelectorName viewAlias, Schemata.View view, PlanNode viewPlan)
public static Constraint replaceAliasesWithProperties(QueryContext context, Constraint constraint, Map<String,String> propertyByAlias)
protected static PropertyValue replaceAliasesWithProperties(QueryContext context, PropertyValue value, Map<String,String> propertyByAlias)
public static DynamicOperand replaceAliasesWithProperties(QueryContext context, DynamicOperand operand, Map<String,String> propertyByAlias)
public static Constraint replaceSubqueriesWithBindVariables(QueryContext context, Constraint constraint, Map<String,Subquery> subqueriesByVariableName)
public static StaticOperand replaceSubqueriesWithBindVariables(QueryContext context, StaticOperand staticOperand, Map<String,Subquery> subqueriesByVariableName)
public static PlanNode addMissingProjectColumns(QueryContext context, PlanNode node, List<Column> allProjectedColumns)
public static void removeDuplicateSelectNodesUnderEachAccessNode(QueryContext context, PlanNode node)
Copyright © 2008–2016 JBoss, a division of Red Hat. All rights reserved.