Package org.apache.calcite.sql.type
Class ExplicitReturnTypeInference
java.lang.Object
org.apache.calcite.sql.type.ExplicitReturnTypeInference
- All Implemented Interfaces:
SqlReturnTypeInference
- Direct Known Subclasses:
TableFunctionReturnTypeInference
A
SqlReturnTypeInference which always returns the same SQL type.-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedExplicitReturnTypeInference(RelProtoDataType protoType) Creates an inference rule which always returns the same type object. -
Method Summary
Modifier and TypeMethodDescriptioninferReturnType(SqlOperatorBinding opBinding) Infers the return type of a call to anSqlOperator.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.SqlReturnTypeInference
andThen, orElse
-
Field Details
-
protoType
-
-
Constructor Details
-
ExplicitReturnTypeInference
Creates an inference rule which always returns the same type object.If the requesting type factory is different, returns a copy of the type object made using
RelDataTypeFactory.copyType(RelDataType)within the requesting type factory.A copy of the type is required because each statement is prepared using a different type factory; each type factory maintains its own cache of canonical instances of each type.
- Parameters:
protoType- Type object
-
-
Method Details
-
inferReturnType
Description copied from interface:SqlReturnTypeInferenceInfers the return type of a call to anSqlOperator.- Specified by:
inferReturnTypein interfaceSqlReturnTypeInference- Parameters:
opBinding- description of operator binding- Returns:
- inferred type; may be null
-