This patch contains the cleanup and refactoring of all the graph walking and rules framework. The unified framework is in the package
Node is the interface that must be implemented by the graph in order to use the graph walkers and rule dispatchers available within this framework. There are two implementations of this interface currently -
1. ASTNode - in ql.parse that is a wrapper around the CommonTree classes of the antlr runtime.
2. Operator - in ql.exec that implements the operator tree nodes
I have also removed the DefaultDispatcher implementation of the Dispatcher. This functionality can be equivalently expressed using DefaultRuleDispatcher. Accordingly I have cleaned out the GenMR* processors and the ColumnPruner to reflect these changes. ColumnPruner is also split into ColumnPrunerProcFactory to create the processors for the various rules needed therein and ColumnPrunerProcCtx which is used to carry the context information (this class is an implementation of NodeProcessorCtx) between rules.
I have gotten rid of all the classes related to the ASTs (ASTEvent, ASTDispatcher, ASTProcessor, ASTEventProcessor etc...)
The Node interfaces are processed by implementations of NodeProcessor. I have removed the reflection bases invocation that we were doing in the earlier DefaultDispatcher and DefaultRuleDispatcher. Now only a single process function is called and the user has to implement a different processors for different rules (see ColumnPrunerProcFactory).
The walker interface has been renamed to GraphWalker and the default implementation is now callled DefaultGraphWalker. Also I have eliminated the TopoWalker. DefaultGraphWalker is now not an abstract class so that clients can use it right out of the box. The ColumnPrunerWalker and the GenMapRedWalker are still subclasses of the DefaultGraphWalker.