Class ExplicitReturnTypeInference

java.lang.Object
org.apache.calcite.sql.type.ExplicitReturnTypeInference
All Implemented Interfaces:
SqlReturnTypeInference
Direct Known Subclasses:
TableFunctionReturnTypeInference

public class ExplicitReturnTypeInference extends Object implements SqlReturnTypeInference
A SqlReturnTypeInference which always returns the same SQL type.
  • Field Details

  • Constructor Details

    • ExplicitReturnTypeInference

      protected ExplicitReturnTypeInference(RelProtoDataType protoType)
      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