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.
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.apache.calcite.sql.type.SqlOperandTypeChecker
org.apache.calcite.sql.type.SqlOperandTypeChecker.Consistency -
Method Summary
Modifier and TypeMethodDescriptionbuilder()static it.unimi.dsi.fastutil.ints.IntSetbuildNullableOperands(int requiredOperandCount, int totalOperandCount, it.unimi.dsi.fastutil.ints.IntSet notNullOperands) booleancheckOperandTypes(org.apache.calcite.sql.SqlCallBinding callBinding, boolean throwOnFailure) getAllowedSignatures(org.apache.calcite.sql.SqlOperator op, String opName) org.apache.calcite.sql.type.SqlOperandTypeChecker.Consistencyorg.apache.calcite.sql.SqlOperandCountRangebooleanisOptional(int i) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.calcite.sql.type.SqlOperandTypeChecker
and, isFixedParameters, or, typeInference, withGenerator
-
Method Details
-
builder
-
checkOperandTypes
public boolean checkOperandTypes(org.apache.calcite.sql.SqlCallBinding callBinding, boolean throwOnFailure) - Specified by:
checkOperandTypesin interfaceorg.apache.calcite.sql.type.SqlOperandTypeChecker
-
getOperandCountRange
public org.apache.calcite.sql.SqlOperandCountRange getOperandCountRange()- Specified by:
getOperandCountRangein interfaceorg.apache.calcite.sql.type.SqlOperandTypeChecker
-
getAllowedSignatures
- Specified by:
getAllowedSignaturesin interfaceorg.apache.calcite.sql.type.SqlOperandTypeChecker
-
getConsistency
public org.apache.calcite.sql.type.SqlOperandTypeChecker.Consistency getConsistency()- Specified by:
getConsistencyin interfaceorg.apache.calcite.sql.type.SqlOperandTypeChecker
-
isOptional
public boolean isOptional(int i) - Specified by:
isOptionalin interfaceorg.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)
-