Class RelParameterizerShuttle

java.lang.Object
org.apache.druid.sql.calcite.planner.RelParameterizerShuttle
All Implemented Interfaces:
org.apache.calcite.rel.RelShuttle

public class RelParameterizerShuttle extends Object implements org.apache.calcite.rel.RelShuttle
Traverse RelNode tree and replaces all RexDynamicParam with RexLiteral using RexBuilder if a value binding exists for the parameter. All parameters must have a value by the time RelParameterizerShuttle is run, or else it will throw an exception. Note: none of the tests currently hit this anymore since SqlParameterizerShuttle has been modified to handle most common jdbc types, but leaving this here provides a safety net to try again to convert parameters to literal values in case SqlParameterizerShuttle fails.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.core.TableFunctionScan scan)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.core.TableScan scan)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalAggregate aggregate)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalCalc calc)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalCorrelate correlate)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalExchange exchange)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalFilter filter)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalIntersect intersect)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalJoin join)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalMatch match)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalMinus minus)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalProject project)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalSort sort)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalTableModify modify)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalUnion union)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.logical.LogicalValues values)
     
    org.apache.calcite.rel.RelNode
    visit(org.apache.calcite.rel.RelNode other)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RelParameterizerShuttle

      public RelParameterizerShuttle(PlannerContext plannerContext)
  • Method Details

    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.core.TableScan scan)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.core.TableFunctionScan scan)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalValues values)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalFilter filter)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalProject project)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalJoin join)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalCorrelate correlate)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalUnion union)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalIntersect intersect)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalMinus minus)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalAggregate aggregate)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalMatch match)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalSort sort)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalExchange exchange)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalCalc calc)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.logical.LogicalTableModify modify)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle
    • visit

      public org.apache.calcite.rel.RelNode visit(org.apache.calcite.rel.RelNode other)
      Specified by:
      visit in interface org.apache.calcite.rel.RelShuttle