Class TextBasedLogicalPlanPrinterImpl

java.lang.Object
se.liu.ida.hefquin.engine.queryplan.utils.BaseForTextBasedPlanPrinters
se.liu.ida.hefquin.engine.queryplan.utils.TextBasedLogicalPlanPrinterImpl
All Implemented Interfaces:
LogicalPlanPrinter

public class TextBasedLogicalPlanPrinterImpl extends BaseForTextBasedPlanPrinters implements LogicalPlanPrinter
Internally, the functionality of this class is implemented based on a LogicalPlanVisitor, which makes sure that we get a compiler error whenever we add a new type of logical operator but forget to extend this class here to cover that new operator.
  • Constructor Details

    • TextBasedLogicalPlanPrinterImpl

      public TextBasedLogicalPlanPrinterImpl()
  • Method Details

    • print

      public void print(LogicalPlan plan, PrintStream out)
      Description copied from interface: LogicalPlanPrinter
      Prints the given plan to the given stream.
      Specified by:
      print in interface LogicalPlanPrinter
    • planWalk

      public void planWalk(LogicalPlan plan, int planNumber, int planLevel, int numberOfSiblings, TextBasedLogicalPlanPrinterImpl.OpPrinter opPrinter, String rootOpIndentString)
      This method recursively goes through a plan, and appends specific strings to a print stream.
      Parameters:
      plan - The current plan (root operator) that will be formatted.
      planNumber - The number of a plan in terms of its super plan.
      planLevel - The depth of the root operator in a plan.
      numberOfSiblings - The number of sibling plans of a plan.
      opPrinter - The helper object for the printing.