Class SqlUnresolvedFunction

public class SqlUnresolvedFunction extends SqlFunction
Placeholder for an unresolved function.

Created by the parser, then it is rewritten to proper SqlFunction by the validator to a function defined in a Calcite schema.

  • Constructor Details

    • SqlUnresolvedFunction

      public SqlUnresolvedFunction(SqlIdentifier sqlIdentifier, @Nullable SqlReturnTypeInference returnTypeInference, @Nullable SqlOperandTypeInference operandTypeInference, @Nullable SqlOperandTypeChecker operandTypeChecker, @Nullable List<RelDataType> paramTypes, SqlFunctionCategory funcType)
      Creates a placeholder SqlUnresolvedFunction for an invocation of a function with a possibly qualified name. This name must be resolved into either a builtin function or a user-defined function.
      sqlIdentifier - possibly qualified identifier for function
      returnTypeInference - strategy to use for return type inference
      operandTypeInference - strategy to use for parameter type inference
      operandTypeChecker - strategy to use for parameter type checking
      paramTypes - array of parameter types
      funcType - function category
  • Method Details

    • inferReturnType

      public RelDataType inferReturnType(SqlOperatorBinding opBinding)
      Infers the return type of an invocation of this operator; only called after the number and types of operands have already been validated. Subclasses must either override this method or supply an instance of SqlReturnTypeInference to the constructor.T

      The operator class for this function isn't resolved to the correct class. This happens in the case of user defined functions. Return the return type to be 'ANY', so we don't fail.

      inferReturnType in class SqlOperator
      opBinding - description of invocation (not necessarily a SqlCall)
      inferred return type