Class ParameterizeOperator

java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlSpecialOperator
org.apache.calcite.sql.SqlInternalOperator
org.apache.druid.sql.calcite.external.ParameterizeOperator

public class ParameterizeOperator extends org.apache.calcite.sql.SqlInternalOperator
Internal operator used to create an on-the-fly table function from a partial table definition within the catalog. Represents a table reference of the form: table_name( arguments ). That, is we treat the table name as a function name, then pass arguments that represent the additional information needed to convert a partial table into a completed table. For example, for a local input source, we might pass the list of files to read.

Calcite doesn't understand this form. So, early in the process, we rewrite nodes of this type into a table macro node which Calcite does understand.

  • Nested Class Summary

    Nested classes/interfaces inherited from class org.apache.calcite.sql.SqlSpecialOperator

    org.apache.calcite.sql.SqlSpecialOperator.ReduceResult, org.apache.calcite.sql.SqlSpecialOperator.TokenSequence
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from class org.apache.calcite.sql.SqlOperator

    kind, MDX_PRECEDENCE, NL
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.calcite.sql.SqlNode
    createCall(org.apache.calcite.sql.SqlNode tableRef, List<org.apache.calcite.sql.SqlNode> paramList)
     
    org.apache.calcite.sql.SqlNode
    rewriteCall(org.apache.calcite.sql.validate.SqlValidator validator, org.apache.calcite.sql.SqlCall call)
     

    Methods inherited from class org.apache.calcite.sql.SqlInternalOperator

    deriveType, getSyntax

    Methods inherited from class org.apache.calcite.sql.SqlSpecialOperator

    reduceExpr

    Methods inherited from class org.apache.calcite.sql.SqlOperator

    acceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, deriveOperandType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getNameAsId, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isAggregator, isDeterministic, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, reverse, rightPrec, toString, unparse, unparseListClause, unparseListClause, validateCall, validateOperands, validRexOperands

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

  • Method Details

    • createCall

      public org.apache.calcite.sql.SqlNode createCall(org.apache.calcite.sql.SqlNode tableRef, List<org.apache.calcite.sql.SqlNode> paramList)
    • rewriteCall

      public org.apache.calcite.sql.SqlNode rewriteCall(org.apache.calcite.sql.validate.SqlValidator validator, org.apache.calcite.sql.SqlCall call)
      Overrides:
      rewriteCall in class org.apache.calcite.sql.SqlOperator