Class FrameUtil
- java.lang.Object
-
- org.teiid.query.optimizer.relational.rules.FrameUtil
-
public class FrameUtil extends Object
-
-
Constructor Summary
Constructors Constructor Description FrameUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static LinkedHashMap<ElementSymbol,Expression>
buildSymbolMap(GroupSymbol oldGroup, GroupSymbol newGroup, QueryMetadataInterface metadata)
creates a symbol map of elements in oldGroup mapped to corresponding elements in newGroup if newGroup is null, then a mapping of oldGroup elements to null constants will be returnedstatic void
convertFrame(PlanNode startNode, GroupSymbol oldGroup, Set<GroupSymbol> newGroups, Map symbolMap, QueryMetadataInterface metadata)
static PlanNode
findJoinSourceNode(PlanNode root)
Find the ACCESS, SOURCE, SET_OP, JOIN, or NULL node that originates the given groups, but will stop at the first join node rather than searching for the best fit.static ProcessorPlan
getNestedPlan(PlanNode accessNode)
Look for SOURCE node either one or two steps below the access node.static boolean
isOrderedOrStrictLimit(PlanNode node)
-
-
-
Method Detail
-
convertFrame
public static void convertFrame(PlanNode startNode, GroupSymbol oldGroup, Set<GroupSymbol> newGroups, Map symbolMap, QueryMetadataInterface metadata) throws QueryPlannerException
- Throws:
QueryPlannerException
-
buildSymbolMap
public static LinkedHashMap<ElementSymbol,Expression> buildSymbolMap(GroupSymbol oldGroup, GroupSymbol newGroup, QueryMetadataInterface metadata) throws QueryMetadataException, TeiidComponentException
creates a symbol map of elements in oldGroup mapped to corresponding elements in newGroup if newGroup is null, then a mapping of oldGroup elements to null constants will be returned- Parameters:
oldGroup
-newGroup
-metadata
-- Returns:
- Throws:
QueryMetadataException
TeiidComponentException
-
findJoinSourceNode
public static PlanNode findJoinSourceNode(PlanNode root)
Find the ACCESS, SOURCE, SET_OP, JOIN, or NULL node that originates the given groups, but will stop at the first join node rather than searching for the best fit. Returns null if the originating node cannot be found.- Parameters:
root
-- Returns:
-
getNestedPlan
public static ProcessorPlan getNestedPlan(PlanNode accessNode)
Look for SOURCE node either one or two steps below the access node. Typically these options look like ACCESS-SOURCE or ACCESS-PROJECT-SOURCE.- Parameters:
accessNode
-- Returns:
-
isOrderedOrStrictLimit
public static boolean isOrderedOrStrictLimit(PlanNode node)
-
-