Class DefaultOperandTypeChecker

java.lang.Object
org.apache.druid.sql.calcite.expression.DefaultOperandTypeChecker
All Implemented Interfaces:
org.apache.calcite.sql.type.SqlOperandTypeChecker

public class DefaultOperandTypeChecker extends Object implements org.apache.calcite.sql.type.SqlOperandTypeChecker
Operand type checker that is used in 'simple' situations: there are a particular number of operands, with particular types, some of which may be optional or nullable, and some of which may be required to be literals.
  • Method Details

    • builder

      public static DefaultOperandTypeChecker.Builder builder()
    • checkOperandTypes

      public boolean checkOperandTypes(org.apache.calcite.sql.SqlCallBinding callBinding, boolean throwOnFailure)
      Specified by:
      checkOperandTypes in interface org.apache.calcite.sql.type.SqlOperandTypeChecker
    • getOperandCountRange

      public org.apache.calcite.sql.SqlOperandCountRange getOperandCountRange()
      Specified by:
      getOperandCountRange in interface org.apache.calcite.sql.type.SqlOperandTypeChecker
    • getAllowedSignatures

      public String getAllowedSignatures(org.apache.calcite.sql.SqlOperator op, String opName)
      Specified by:
      getAllowedSignatures in interface org.apache.calcite.sql.type.SqlOperandTypeChecker
    • getConsistency

      public org.apache.calcite.sql.type.SqlOperandTypeChecker.Consistency getConsistency()
      Specified by:
      getConsistency in interface org.apache.calcite.sql.type.SqlOperandTypeChecker
    • isOptional

      public boolean isOptional(int i)
      Specified by:
      isOptional in interface org.apache.calcite.sql.type.SqlOperandTypeChecker
    • buildNullableOperands

      public static it.unimi.dsi.fastutil.ints.IntSet buildNullableOperands(int requiredOperandCount, int totalOperandCount, it.unimi.dsi.fastutil.ints.IntSet notNullOperands)