Class PrelVisualizerVisitor
java.lang.Object
org.apache.drill.exec.planner.physical.visitor.PrelVisualizerVisitor
- All Implemented Interfaces:
PrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception>
public class PrelVisualizerVisitor
extends Object
implements PrelVisitor<Void,PrelVisualizerVisitor.VisualizationState,Exception>
Debug-time class that prints a PRel tree to the console for
inspection. Insert this into code during development to see
the state of the tree at various points of interest during
the planning process.
Use this by inserting lines into our prel transforms to see what is happening. This is useful if you must understand the transforms, or change them. For example:
In file: DefaultSqlHandler#convertToPrel()
:
PrelVisualizerVisitor.print("Before EER", phyRelNode); // Debug only
phyRelNode = ExcessiveExchangeIdentifier.removeExcessiveEchanges(phyRelNode, targetSliceSize);
PrelVisualizerVisitor.print("After EER", phyRelNode); // Debug only
-
Nested Class Summary
-
Field Summary
Fields inherited from interface org.apache.drill.exec.planner.physical.visitor.PrelVisitor
logger
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
visitJoin
(JoinPrel prel, PrelVisualizerVisitor.VisualizationState value) visitLeaf
(LeafPrel prel, PrelVisualizerVisitor.VisualizationState value) visitPrel
(Prel prel, PrelVisualizerVisitor.VisualizationState value) visitScan
(ScanPrel prel, PrelVisualizerVisitor.VisualizationState value) static String
-
Constructor Details
-
PrelVisualizerVisitor
public PrelVisualizerVisitor()
-
-
Method Details
-
print
-
visualize
-
visitExchange
public Void visitExchange(ExchangePrel prel, PrelVisualizerVisitor.VisualizationState value) throws Exception - Specified by:
visitExchange
in interfacePrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception> - Throws:
Exception
-
visitScreen
public Void visitScreen(ScreenPrel prel, PrelVisualizerVisitor.VisualizationState value) throws Exception - Specified by:
visitScreen
in interfacePrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception> - Throws:
Exception
-
visitWriter
public Void visitWriter(WriterPrel prel, PrelVisualizerVisitor.VisualizationState value) throws Exception - Specified by:
visitWriter
in interfacePrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception> - Throws:
Exception
-
visitScan
public Void visitScan(ScanPrel prel, PrelVisualizerVisitor.VisualizationState value) throws Exception - Specified by:
visitScan
in interfacePrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception> - Throws:
Exception
-
visitScan
public Void visitScan(DirectScanPrel prel, PrelVisualizerVisitor.VisualizationState value) throws Exception - Specified by:
visitScan
in interfacePrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception> - Throws:
Exception
-
visitJoin
public Void visitJoin(JoinPrel prel, PrelVisualizerVisitor.VisualizationState value) throws Exception - Specified by:
visitJoin
in interfacePrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception> - Throws:
Exception
-
visitProject
public Void visitProject(ProjectPrel prel, PrelVisualizerVisitor.VisualizationState value) throws Exception - Specified by:
visitProject
in interfacePrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception> - Throws:
Exception
-
visitPrel
- Specified by:
visitPrel
in interfacePrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception> - Throws:
Exception
-
visitUnnest
public Void visitUnnest(UnnestPrel prel, PrelVisualizerVisitor.VisualizationState value) throws Exception - Specified by:
visitUnnest
in interfacePrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception> - Throws:
Exception
-
visitLateral
public Void visitLateral(LateralJoinPrel prel, PrelVisualizerVisitor.VisualizationState value) throws Exception - Specified by:
visitLateral
in interfacePrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception> - Throws:
Exception
-
visitLeaf
public Void visitLeaf(LeafPrel prel, PrelVisualizerVisitor.VisualizationState value) throws Exception - Specified by:
visitLeaf
in interfacePrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception> - Throws:
Exception
-
visitTableModify
public Void visitTableModify(TableModifyPrel prel, PrelVisualizerVisitor.VisualizationState value) throws Exception - Specified by:
visitTableModify
in interfacePrelVisitor<Void,
PrelVisualizerVisitor.VisualizationState, Exception> - Throws:
Exception
-