Class RelationalPlanner
- java.lang.Object
-
- org.teiid.query.optimizer.relational.RelationalPlanner
-
public class RelationalPlanner extends Object
This class generates a relational plan for query execution. The output of this class is aPlanNode
object - this object then becomes the input toPlanToProcessConverter
to produce aRelationalPlan
.
-
-
Field Summary
Fields Modifier and Type Field Description static String
MAT_PREFIX
-
Constructor Summary
Constructors Constructor Description RelationalPlanner()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SymbolMap
buildGroupingNode(Collection<AggregateSymbol> aggs, List<? extends Expression> groupingCols, PlanNode groupNode, CommandContext cc, IDGenerator idGenerator)
Build a grouping node that introduces a anon group (without a inline view source node)RuleStack
buildRules()
Query
createMatViewQuery(Object viewMatadataId, Object matMetadataId, String matTableName, List<? extends Expression> select, boolean isGlobal)
static Query
createMatViewQuery(Object matMetadataId, String matTableName, List<? extends Expression> select, boolean isGlobal)
org.teiid.query.optimizer.relational.RelationalPlanner.PlanningStackEntry
createPlanningStackEntry(GroupSymbol group, Command nestedCommand, boolean isUpdateProcedure, Set<org.teiid.query.optimizer.relational.RelationalPlanner.PlanningStackEntry> entries)
static PlanNode
createProjectNode(List<? extends Expression> select)
static PlanNode
createSelectNode(Criteria crit, boolean isHaving)
static PlanNode
createSortNode(OrderBy orderBy)
PlanNode
executeRules(RuleStack rules, PlanNode plan)
PlanNode
generatePlan(Command cmd)
static Object
getTrackableGroup(GroupSymbol group, QueryMetadataInterface metadata)
void
initialize(Command command, IDGenerator idGenerator, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord analysisRecord, CommandContext context)
static boolean
isNoCacheGroup(QueryMetadataInterface metadata, Object metadataID, Option option)
RelationalPlan
optimize(Command command)
void
planSubqueries(Set<GroupSymbol> groupSymbols, PlanNode node, List<SubqueryContainer<?>> subqueryContainers, boolean isStackEntry, boolean skipPlanning)
static Map<ElementSymbol,List<Set<Constant>>>
remapPartitionInfo(GroupSymbol group, Map<ElementSymbol,List<Set<Constant>>> partitionInfo)
-
-
-
Field Detail
-
MAT_PREFIX
public static final String MAT_PREFIX
- See Also:
- Constant Field Values
-
-
Method Detail
-
optimize
public RelationalPlan optimize(Command command) throws QueryPlannerException, QueryMetadataException, TeiidComponentException, QueryResolverException
-
initialize
public void initialize(Command command, IDGenerator idGenerator, QueryMetadataInterface metadata, CapabilitiesFinder capFinder, AnalysisRecord analysisRecord, CommandContext context)
-
planSubqueries
public void planSubqueries(Set<GroupSymbol> groupSymbols, PlanNode node, List<SubqueryContainer<?>> subqueryContainers, boolean isStackEntry, boolean skipPlanning) throws QueryMetadataException, TeiidComponentException, QueryPlannerException
-
buildRules
public RuleStack buildRules()
-
executeRules
public PlanNode executeRules(RuleStack rules, PlanNode plan) throws QueryPlannerException, QueryMetadataException, TeiidComponentException
-
generatePlan
public PlanNode generatePlan(Command cmd) throws TeiidComponentException, TeiidProcessingException
-
remapPartitionInfo
public static Map<ElementSymbol,List<Set<Constant>>> remapPartitionInfo(GroupSymbol group, Map<ElementSymbol,List<Set<Constant>>> partitionInfo)
-
getTrackableGroup
public static Object getTrackableGroup(GroupSymbol group, QueryMetadataInterface metadata) throws TeiidComponentException, QueryMetadataException
-
createPlanningStackEntry
public org.teiid.query.optimizer.relational.RelationalPlanner.PlanningStackEntry createPlanningStackEntry(GroupSymbol group, Command nestedCommand, boolean isUpdateProcedure, Set<org.teiid.query.optimizer.relational.RelationalPlanner.PlanningStackEntry> entries) throws TeiidComponentException, QueryMetadataException, QueryPlannerException
-
buildGroupingNode
public static SymbolMap buildGroupingNode(Collection<AggregateSymbol> aggs, List<? extends Expression> groupingCols, PlanNode groupNode, CommandContext cc, IDGenerator idGenerator) throws QueryMetadataException, TeiidComponentException
Build a grouping node that introduces a anon group (without a inline view source node)
-
createProjectNode
public static PlanNode createProjectNode(List<? extends Expression> select)
-
createMatViewQuery
public static Query createMatViewQuery(Object matMetadataId, String matTableName, List<? extends Expression> select, boolean isGlobal)
-
createMatViewQuery
public Query createMatViewQuery(Object viewMatadataId, Object matMetadataId, String matTableName, List<? extends Expression> select, boolean isGlobal) throws QueryMetadataException, TeiidComponentException
-
isNoCacheGroup
public static boolean isNoCacheGroup(QueryMetadataInterface metadata, Object metadataID, Option option) throws QueryMetadataException, TeiidComponentException
-
-