Class ExplicitOperatorBinding

java.lang.Object
org.apache.calcite.sql.SqlOperatorBinding
org.apache.calcite.sql.ExplicitOperatorBinding

public class ExplicitOperatorBinding extends SqlOperatorBinding
ExplicitOperatorBinding implements SqlOperatorBinding via an underlying array of known operand types.
  • Constructor Details

  • Method Details

    • getOperandCount

      public int getOperandCount()
      Description copied from class: SqlOperatorBinding
      Returns the number of bound operands. Includes pre-operands and regular operands.
      Specified by:
      getOperandCount in class SqlOperatorBinding
    • getOperandType

      public RelDataType getOperandType(int ordinal)
      Description copied from class: SqlOperatorBinding
      Gets the type of a bound operand.
      Specified by:
      getOperandType in class SqlOperatorBinding
      Parameters:
      ordinal - zero-based ordinal of operand of interest
      Returns:
      bound operand type
    • newError

      public CalciteException newError(org.apache.calcite.runtime.Resources.ExInst<SqlValidatorException> e)
      Description copied from class: SqlOperatorBinding
      Wraps a validation error with context appropriate to this operator call.
      Specified by:
      newError in class SqlOperatorBinding
      Parameters:
      e - Validation error, not null
      Returns:
      Error wrapped, if possible, with positional information
    • isOperandNull

      public boolean isOperandNull(int ordinal, boolean allowCast)
      Description copied from class: SqlOperatorBinding
      Determines whether a bound operand is NULL.

      This is only relevant for SQL validation.

      Overrides:
      isOperandNull in class SqlOperatorBinding
      Parameters:
      ordinal - zero-based ordinal of operand of interest
      allowCast - whether to regard CAST(constant) as a constant
      Returns:
      whether operand is null; false for everything except SQL validation