|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.InheritableVisitor | +--edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.TwoParamVisitor | +--edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite.ReWriteRules | +--edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite.MergeOperatorRules
This Class is used to merge operators by traversing the XAT.
Fields inherited from class edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite.ReWriteRules |
classVector,
result,
statis,
variableTable |
Constructor Summary | |
MergeOperatorRules()
Default MergeOperatorRules constructor. |
Method Summary | |
protected void |
findMergable(Tagger parent,
Tagger child,
DOMPatternNode pPatternNode,
java.util.Vector mergable)
Find if the two taggers are mergable or not. |
protected ReWriteResult |
mergeNavigates(Navigate parent,
Navigate child)
Merges two Navigates |
protected int |
mergeTaggers(Tagger parent,
Tagger child)
Merge two Taggers if possible. |
protected void |
reduceGroupBy(GroupBy parent)
Rule to merge GroupBy with GroupBy |
protected java.lang.Object |
reduceGroupByNavigate(GroupBy gbOp,
Navigate navOp)
It used to merge a GB with Agg() on top of NavUnnest/NavCollection into NavCollection. |
protected void |
splitSelect(Select parent)
Recursively splits a Select operator. |
java.lang.Object |
visit(Distinct parent,
Distinct child)
Rule to merge Distinct with Distinct |
java.lang.Object |
visit(Distinct parent,
XATOperator child)
Rule to merge Distinct with XATOperator |
java.lang.Object |
visit(GroupBy gbOp,
XATOperator child)
Rule to merge GroupBy with XATOperator |
java.lang.Object |
visit(NavCollection parent,
NavCollection child)
Rule to merge NavCollection with NavCollection. |
java.lang.Object |
visit(NavCollection parent,
NavUnnest child)
Rule to merge NavCollection with NavUnnest These two cannot be merged |
java.lang.Object |
visit(NavUnnest navOp,
GroupBy gbOp)
Merge NavigateUnnest and a GroupBy together, and make a rename operator out of it. |
java.lang.Object |
visit(NavUnnest parent,
NavCollection child)
Rule to merge NavUnnest with NavCollection |
java.lang.Object |
visit(NavUnnest parent,
NavUnnest child)
Rule to merge NavUnnest with NavUnnest |
java.lang.Object |
visit(Select parent,
XATOperator child)
This is the rule to split a Select in half The Select can be split in half iff it contains an AND or OR If the Select contains an AND then the a new Select is created and the tree looks like this: Before: Select (exp1 AND exp2) After: Select (exp1) | Select (exp2) If the Select contains an OR then we dont support it yet.... |
java.lang.Object |
visit(Tagger parent,
Merge child)
Rule to merge Tagger with Merge. |
java.lang.Object |
visit(Tagger parent,
Tagger child)
Rule to merge Tagger with Tagger |
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.component.xatrewrite.ReWriteRules |
combineSteps,
copyNode,
createString,
deleteAggregate,
deletePartialTagger,
deleteWholeTagger,
dispatch,
dispatch,
dispatch,
evaluateRules,
evaluateRules,
findMatchingNavigationNode,
findMatchingNavigationNode,
getChildren,
getColumnNames,
getStatis,
getVariableTable,
isDebug,
isGatherStatistics,
isUsedAbove,
moveNode,
moveNodeToRoot,
setDebug,
setVariableTable,
swap,
visit,
visit |
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.TwoParamVisitor |
getMethod,
visit |
Methods inherited from class edu.wpi.cs.dsrg.xmldb.xat.common.visitorpattern.InheritableVisitor |
getAncestors,
getMethod,
visit |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Constructor Detail |
public MergeOperatorRules()
Method Detail |
protected void findMergable(Tagger parent, Tagger child, DOMPatternNode pPatternNode, java.util.Vector mergable)
parent
- The parent Tagger node.child
- The child Tagger node.pPatternNode
- The DOMPatternNode of parent Tagger.mergable
- The Vector of mergable element.DOMPatternNode
,
Tagger
protected ReWriteResult mergeNavigates(Navigate parent, Navigate child)
parent
- The parent Navigate node.child
- The child Navigate node.Navigate
protected int mergeTaggers(Tagger parent, Tagger child)
parent
- The parent Tagger node.child
- The child Tagger node.Tagger
,
findMergable
protected void reduceGroupBy(GroupBy parent)
parent
- The parent GroupBy node.GroupBy
protected java.lang.Object reduceGroupByNavigate(GroupBy gbOp, Navigate navOp)
gbOp
- The GroupBy operator.unnestOp
- The NavUnnest operator.GroupBy
,
Navigate
protected void splitSelect(Select parent)
parent
- The Select operaotr.Select
public java.lang.Object visit(Distinct parent, Distinct child)
parent
- The parent Distinct operator.child
- The child Distinct operator.Distinct
public java.lang.Object visit(Distinct parent, XATOperator child)
parent
- The parent Distinct operator.child
- The child XATOperator operator.Distinct
,
XATOperator
public java.lang.Object visit(GroupBy gbOp, XATOperator child)
gbOp
- The parent GroupBy operator.child
- The child XATOperator operator.GroupBy
,
XATOperator
public java.lang.Object visit(Select parent, XATOperator child)
parent
- The parent Select operator.child
- The child XATOperator operator.Select
public java.lang.Object visit(NavCollection parent, NavCollection child)
parent
- The parent NavCollection operator.child
- The child NavCollection operator.NavCollection
public java.lang.Object visit(NavCollection parent, NavUnnest child)
parent
- The parent NavCollection operator.child
- The child NavUnnest operator.NavCollection
,
NavUnnest
public java.lang.Object visit(NavUnnest navOp, GroupBy gbOp)
navOp
- The parent NavUnnest operator.gbOp
- The child GroupBy operator.GroupBy
,
NavUnnest
public java.lang.Object visit(NavUnnest parent, NavCollection child)
parent
- The parent NavUnnest operator.child
- The child NavCollection operator.NavCollection
,
NavUnnest
public java.lang.Object visit(NavUnnest parent, NavUnnest child)
parent
- The parent NavUnnest operator.child
- The child NavUnnest operator.NavUnnest
public java.lang.Object visit(Tagger parent, Merge child)
parent
- The parent Tagger operator.child
- The child Merge operator.Tagger
,
Merge
public java.lang.Object visit(Tagger parent, Tagger child)
parent
- The parent Tagger operator.child
- The child Tagger operator.Tagger
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |