Package org.apache.calcite.sql.type
Class InferTypes
- java.lang.Object
-
- org.apache.calcite.sql.type.InferTypes
-
public abstract class InferTypes extends java.lang.Object
Strategies for inferring operand types.- See Also:
SqlOperandTypeInference
,ReturnTypes
-
-
Field Summary
Fields Modifier and Type Field Description static SqlOperandTypeInference
BOOLEAN
Operand type-inference strategy where an unknown operand type is assumed to be boolean.static SqlOperandTypeInference
FIRST_KNOWN
Operand type-inference strategy where an unknown operand type is derived from the first operand with a known type.static SqlOperandTypeInference
RETURN_TYPE
Operand type-inference strategy where an unknown operand type is derived from the call's return type.static SqlOperandTypeInference
VARCHAR_1024
Operand type-inference strategy where an unknown operand type is assumed to be VARCHAR(1024).
-
Constructor Summary
Constructors Modifier Constructor Description private
InferTypes()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static SqlOperandTypeInference
explicit(java.util.List<RelDataType> types)
Returns anSqlOperandTypeInference
that returns a given list of types.
-
-
-
Field Detail
-
FIRST_KNOWN
public static final SqlOperandTypeInference FIRST_KNOWN
Operand type-inference strategy where an unknown operand type is derived from the first operand with a known type.
-
RETURN_TYPE
public static final SqlOperandTypeInference RETURN_TYPE
Operand type-inference strategy where an unknown operand type is derived from the call's return type. If the return type is a record, it must have the same number of fields as the number of operands.
-
BOOLEAN
public static final SqlOperandTypeInference BOOLEAN
Operand type-inference strategy where an unknown operand type is assumed to be boolean.
-
VARCHAR_1024
public static final SqlOperandTypeInference VARCHAR_1024
Operand type-inference strategy where an unknown operand type is assumed to be VARCHAR(1024). This is not something which should be used in most cases (especially since the precision is arbitrary), but for IS [NOT] NULL, we don't really care about the type at all, so it's reasonable to use something that every other type can be cast to.
-
-
Method Detail
-
explicit
public static SqlOperandTypeInference explicit(java.util.List<RelDataType> types)
Returns anSqlOperandTypeInference
that returns a given list of types.
-
-