Class BuiltInTableFunction<T>

java.lang.Object
org.apache.flink.table.functions.UserDefinedFunction
org.apache.flink.table.functions.TableFunction<T>
org.apache.flink.table.runtime.functions.table.BuiltInTableFunction<T>
All Implemented Interfaces:
Serializable, org.apache.flink.table.functions.FunctionDefinition
Direct Known Subclasses:
ReplicateRowsFunction, UnnestRowsFunction.CollectionUnnestTableFunction, UnnestRowsFunction.MapUnnestTableFunction

@Internal public abstract class BuiltInTableFunction<T> extends org.apache.flink.table.functions.TableFunction<T>
Base class for runtime implementation represented as TableFunction that is constructed from BuiltInFunctionDefinition.specialize(SpecializedContext).

Subclasses must offer a constructor that takes SpecializedFunction.SpecializedContext if they are constructed from a BuiltInFunctionDefinition. Otherwise the BuiltInTableFunction() constructor might be more appropriate.

By default, all built-in functions work on internal data structures. However, this can be changed by overriding getArgumentDataTypes() and getOutputDataType(). Or by overriding getTypeInference(DataTypeFactory) directly.

See Also:
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
     
    protected
    BuiltInTableFunction(org.apache.flink.table.functions.BuiltInFunctionDefinition definition, org.apache.flink.table.functions.SpecializedFunction.SpecializedContext context)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    List<org.apache.flink.table.types.DataType>
     
    org.apache.flink.table.types.DataType
     
    Set<org.apache.flink.table.functions.FunctionRequirement>
     
    org.apache.flink.table.types.inference.TypeInference
    getTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory)
     
    boolean
     

    Methods inherited from class org.apache.flink.table.functions.TableFunction

    collect, finish, getKind, getParameterTypes, getResultType, setCollector

    Methods inherited from class org.apache.flink.table.functions.UserDefinedFunction

    close, functionIdentifier, open, toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.apache.flink.table.functions.FunctionDefinition

    supportsConstantFolding
  • Constructor Details

    • BuiltInTableFunction

      protected BuiltInTableFunction(org.apache.flink.table.functions.BuiltInFunctionDefinition definition, org.apache.flink.table.functions.SpecializedFunction.SpecializedContext context)
    • BuiltInTableFunction

      protected BuiltInTableFunction()
  • Method Details

    • getArgumentDataTypes

      public List<org.apache.flink.table.types.DataType> getArgumentDataTypes()
    • getOutputDataType

      public org.apache.flink.table.types.DataType getOutputDataType()
    • getTypeInference

      public org.apache.flink.table.types.inference.TypeInference getTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory)
      Specified by:
      getTypeInference in interface org.apache.flink.table.functions.FunctionDefinition
      Overrides:
      getTypeInference in class org.apache.flink.table.functions.TableFunction<T>
    • getRequirements

      public Set<org.apache.flink.table.functions.FunctionRequirement> getRequirements()
    • isDeterministic

      public boolean isDeterministic()