|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pig.impl.eval.EvalSpecVisitor
public abstract class EvalSpecVisitor
A visitor mechanism for navigating and operating on a tree of EvalSpecs. This class contains the logic to navigate thre tree, but does not do anything with or to the tree. In order to operate on or extract information from the tree, extend this class. You only need to implement the methods dealing with the eval specs you are concerned with. For example, if you wish to find every FilterSpec and perform some operation on it, your visitor would look like: class MyEvalSpecVisitor extends EvalSpecVisitor { public void visitFilter(FilterSpec f) { you're logic here } } Any specs that you do not implement the visitX method for will then be navigated through by this class. *NOTE* When envoking a visitor, you should never call one of the methods in this class. You should pass your visitor as an argument to visit() on the object you want to visit. So: RIGHT: FilterSpec myFilter; MyVisitor v; myFilter.visit(v); WRONG: FilterSpec myFilter; MyVisitor v; v.visitFilter(myFilter); These methods are only public to make them accessible to the EvalSpec objects.
Constructor Summary | |
---|---|
EvalSpecVisitor()
|
Method Summary | |
---|---|
void |
visitBinCond(BinCondSpec bc)
Only BinCondSpec.visit() and subclass implementations of this function should ever call this method. |
void |
visitCompositeEval(CompositeEvalSpec ce)
Only CompositeEvalSpec.visit() and subclass implementations of this function should ever call this method. |
void |
visitConst(ConstSpec c)
Only ConstSpec.visit() and subclass implementations of this function should ever call this method. |
void |
visitFilter(FilterSpec f)
Only FilterSpec.visit() and subclass implementations of this function should ever call this method. |
void |
visitFuncEval(FuncEvalSpec fe)
Only FuncEvalSpec.visit() and subclass implementations of this function should ever call this method. |
void |
visitGenerate(GenerateSpec g)
Only GenerateSpec.visit() and subclass implementations of this function should ever call this method. |
void |
visitMapLookup(MapLookupSpec ml)
Only MapLookupSpec.visit() and subclass implementations of this function should ever call this method. |
void |
visitProject(ProjectSpec p)
Only ProjectSpec.visit() and subclass implementations of this function should ever call this method. |
void |
visitSortDistinct(SortDistinctSpec sd)
Only SortDistinctSpec.visit() and subclass implementations of this function should ever call this method. |
void |
visitStar(StarSpec s)
Only StarSpec.visit() and subclass implementations of this function should ever call this method. |
void |
visitStream(StreamSpec stream)
Only StreamSpec.visit() and subclass implementations of this function should ever call this method. |
void |
visitTimeWindow(TimeWindowSpec tw)
Only TimeWindowSpec.visit() and subclass implementations of this function should ever call this method. |
void |
visitTupleWindow(TupleWindowSpec tw)
Only TupleWindowSpec.visit() and subclass implementations of this function should ever call this method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EvalSpecVisitor()
Method Detail |
---|
public void visitFilter(FilterSpec f)
public void visitSortDistinct(SortDistinctSpec sd)
public void visitGenerate(GenerateSpec g)
public void visitMapLookup(MapLookupSpec ml)
public void visitConst(ConstSpec c)
public void visitProject(ProjectSpec p)
public void visitStar(StarSpec s)
public void visitFuncEval(FuncEvalSpec fe)
public void visitCompositeEval(CompositeEvalSpec ce)
public void visitBinCond(BinCondSpec bc)
public void visitTimeWindow(TimeWindowSpec tw)
public void visitTupleWindow(TupleWindowSpec tw)
public void visitStream(StreamSpec stream)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |