Class BridgingSqlFunction

java.lang.Object
org.apache.calcite.sql.SqlOperator
org.apache.calcite.sql.SqlFunction
org.apache.flink.table.planner.functions.bridging.BridgingSqlFunction
Direct Known Subclasses:
BridgingSqlFunction.WithTableFunction

@Internal public class BridgingSqlFunction extends org.apache.calcite.sql.SqlFunction
Bridges FunctionDefinition to Calcite's representation of a scalar or table function (either a system or user-defined function).
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
    Special flavor of BridgingSqlFunction to indicate a table function to Calcite.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final org.apache.flink.table.types.inference.TypeInference
     

    Fields inherited from class org.apache.calcite.sql.SqlOperator

    kind, MDX_PRECEDENCE, NL
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.flink.table.catalog.DataTypeFactory
     
    org.apache.flink.table.functions.FunctionDefinition
     
    org.apache.flink.table.catalog.ContextResolvedFunction
     
     
    FlinkTypeFactory
     
    org.apache.flink.table.types.inference.TypeInference
     
    boolean
     
    of(FlinkContext context, FlinkTypeFactory typeFactory, org.apache.flink.table.catalog.ContextResolvedFunction resolvedFunction)
    Creates an instance of a scalar or table function during translation.
    of(org.apache.calcite.plan.RelOptCluster cluster, org.apache.flink.table.catalog.ContextResolvedFunction resolvedFunction)
    Creates an instance of a scalar or table function during translation.
    of(org.apache.calcite.plan.RelOptCluster cluster, org.apache.flink.table.functions.BuiltInFunctionDefinition functionDefinition)
    Creates an instance of a scalar or table built-in function during translation.
    of(org.apache.flink.table.catalog.DataTypeFactory dataTypeFactory, FlinkTypeFactory typeFactory, RexFactory rexFactory, org.apache.calcite.sql.SqlKind kind, org.apache.flink.table.catalog.ContextResolvedFunction resolvedFunction, org.apache.flink.table.types.inference.TypeInference typeInference)
    Creates an instance of a scalar or table function (either a system or user-defined function).

    Methods inherited from class org.apache.calcite.sql.SqlFunction

    deriveType, getFunctionType, getNameAsId, getParamNames, getParamTypes, getSqlIdentifier, getSyntax, isQuantifierAllowed, unparse, validateCall, validateQuantifier

    Methods inherited from class org.apache.calcite.sql.SqlOperator

    acceptCall, acceptCall, adjustType, allowsFraming, argumentMustBeScalar, checkOperandCount, checkOperandTypes, constructArgNameList, constructArgTypeList, constructOperandList, createCall, createCall, createCall, createCall, createCall, createCall, createCall, deriveOperandType, equals, getAllowedSignatures, getAllowedSignatures, getKind, getLeftPrec, getMonotonicity, getMonotonicity, getName, getOperandCountRange, getOperandTypeChecker, getOperandTypeInference, getReturnTypeInference, getRightPrec, getSignatureTemplate, getStrongPolicyInference, hashCode, inferReturnType, inferReturnType, isAggregator, isDynamicFunction, isGroup, isGroupAuxiliary, isName, isSymmetrical, leftPrec, not, preValidateCall, requiresDecimalExpansion, requiresOrder, requiresOver, reverse, rewriteCall, rightPrec, toString, unparseListClause, unparseListClause, validateOperands, validRexOperands

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • typeInference

      protected final org.apache.flink.table.types.inference.TypeInference typeInference
  • Method Details

    • of

      public static BridgingSqlFunction of(org.apache.flink.table.catalog.DataTypeFactory dataTypeFactory, FlinkTypeFactory typeFactory, RexFactory rexFactory, org.apache.calcite.sql.SqlKind kind, org.apache.flink.table.catalog.ContextResolvedFunction resolvedFunction, org.apache.flink.table.types.inference.TypeInference typeInference)
      Creates an instance of a scalar or table function (either a system or user-defined function).
      Parameters:
      dataTypeFactory - used for creating DataType
      typeFactory - used for bridging to RelDataType
      rexFactory - used for SpecializedFunction.ExpressionEvaluatorFactory
      kind - commonly used SQL standard function; use SqlKind.OTHER_FUNCTION if this function cannot be mapped to a common function kind.
      resolvedFunction - system or user-defined FunctionDefinition with context
      typeInference - type inference logic
    • of

      public static BridgingSqlFunction of(FlinkContext context, FlinkTypeFactory typeFactory, org.apache.flink.table.catalog.ContextResolvedFunction resolvedFunction)
      Creates an instance of a scalar or table function during translation.
    • of

      public static BridgingSqlFunction of(org.apache.calcite.plan.RelOptCluster cluster, org.apache.flink.table.catalog.ContextResolvedFunction resolvedFunction)
      Creates an instance of a scalar or table function during translation.
    • of

      public static BridgingSqlFunction of(org.apache.calcite.plan.RelOptCluster cluster, org.apache.flink.table.functions.BuiltInFunctionDefinition functionDefinition)
      Creates an instance of a scalar or table built-in function during translation.
    • getDataTypeFactory

      public org.apache.flink.table.catalog.DataTypeFactory getDataTypeFactory()
    • getTypeFactory

      public FlinkTypeFactory getTypeFactory()
    • getRexFactory

      public RexFactory getRexFactory()
    • getResolvedFunction

      public org.apache.flink.table.catalog.ContextResolvedFunction getResolvedFunction()
    • getDefinition

      public org.apache.flink.table.functions.FunctionDefinition getDefinition()
    • getTypeInference

      public org.apache.flink.table.types.inference.TypeInference getTypeInference()
    • isDeterministic

      public boolean isDeterministic()
      Overrides:
      isDeterministic in class org.apache.calcite.sql.SqlOperator