A visitor mechanism for navigating and operating on a tree of Physical Operators. This class contains the logic to navigate the 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 physical operators you are concerned with. For example, if you wish to find every POMapreduce in a physical plan and perform some operation on it, your visitor would look like: class MyPOVisitor extends POVisitor { public void visitMapreduce(POMapreduce mr) { you're logic here } } Any operators 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: POEval myEval; MyVisitor v; myEval.visit(v); WRONG: POEval myEval; MyVisitor v; v.visitEval(myEval); These methods are only public to make them accessible to the PO* objects.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.