Class PrepareResult

java.lang.Object
org.apache.druid.sql.calcite.planner.PrepareResult

public class PrepareResult extends Object
After preparing an SQL query with DruidPlanner, the artifacts produced are the output signature of the result row, and type information for any dynamic parameters which must be bound before planning the query.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PrepareResult(org.apache.calcite.rel.type.RelDataType validatedRowType, org.apache.calcite.rel.type.RelDataType returnedRowType, org.apache.calcite.rel.type.RelDataType parameterRowType)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.calcite.rel.type.RelDataType
    Row type from SqlValidator.getParameterRowType(org.apache.calcite.sql.SqlNode) containing the name and type of each parameter.
    org.apache.calcite.rel.type.RelDataType
    Row type for the result that the end user will receive.
    org.apache.calcite.rel.type.RelDataType
    Row type from RelRoot.validatedRowType prepared by DruidPlanner.prepare().

    Methods inherited from class java.lang.Object

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

    • PrepareResult

      public PrepareResult(org.apache.calcite.rel.type.RelDataType validatedRowType, org.apache.calcite.rel.type.RelDataType returnedRowType, org.apache.calcite.rel.type.RelDataType parameterRowType)
  • Method Details

    • getValidatedRowType

      public org.apache.calcite.rel.type.RelDataType getValidatedRowType()
      Row type from RelRoot.validatedRowType prepared by DruidPlanner.prepare(). Corresponds to the SELECT portion of a SQL statement. For SELECT, this is the row type of the SELECT itself. For EXPLAIN PLAN FOR SELECT, INSERT ... SELECT, or REPLACE ... SELECT, this is the row type of the embedded SELECT.
    • getReturnedRowType

      public org.apache.calcite.rel.type.RelDataType getReturnedRowType()
      Row type for the result that the end user will receive. Different from getValidatedRowType() in cases like EXPLAIN (where the user gets an explanation, not the query results) and other non-SELECT statements.
    • getParameterRowType

      public org.apache.calcite.rel.type.RelDataType getParameterRowType()
      Row type from SqlValidator.getParameterRowType(org.apache.calcite.sql.SqlNode) containing the name and type of each parameter.