Class BuiltInScalarFunction
- java.lang.Object
-
- org.apache.flink.table.functions.UserDefinedFunction
-
- org.apache.flink.table.functions.ScalarFunction
-
- org.apache.flink.table.runtime.functions.scalar.BuiltInScalarFunction
-
- All Implemented Interfaces:
Serializable,org.apache.flink.table.functions.FunctionDefinition
- Direct Known Subclasses:
ArrayAppendFunction,ArrayConcatFunction,ArrayContainsFunction,ArrayDistinctFunction,ArrayExceptFunction,ArrayIntersectFunction,ArrayJoinFunction,ArrayMaxFunction,ArrayMinFunction,ArrayPositionFunction,ArrayPrependFunction,ArrayRemoveFunction,ArrayReverseFunction,ArraySliceFunction,ArraySortFunction,ArrayUnionFunction,BTrimFunction,CoalesceFunction,EltFunction,EndsWithFunction,IfNullFunction,JsonQuoteFunction,JsonUnquoteFunction,MapEntriesFunction,MapFromArraysFunction,MapKeysFunction,MapUnionFunction,MapValuesFunction,ParseJsonFunction,PrintfFunction,RegexpCountFunction,RegexpExtractAllFunction,RegexpInstrFunction,RegexpSubstrFunction,SourceWatermarkFunction,SplitFunction,StartsWithFunction,ToTimestampLtzFunction,TranslateFunction,TryParseJsonFunction,TypeOfFunction,UnhexFunction,UrlDecodeFunction,UrlEncodeFunction
@Internal public abstract class BuiltInScalarFunction extends org.apache.flink.table.functions.ScalarFunctionBase class for runtime implementation represented asScalarFunctionthat is constructed fromBuiltInFunctionDefinition.specialize(SpecializedContext).Subclasses must offer a constructor that takes
SpecializedFunction.SpecializedContextif they are constructed from aBuiltInFunctionDefinition. Otherwise theBuiltInScalarFunction()constructor might be more appropriate.By default, all built-in functions work on internal data structures. However, this can be changed by overriding
getArgumentDataTypes()andgetOutputDataType(). Or by overridinggetTypeInference(DataTypeFactory)directly.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedBuiltInScalarFunction()protectedBuiltInScalarFunction(org.apache.flink.table.functions.BuiltInFunctionDefinition definition, org.apache.flink.table.functions.SpecializedFunction.SpecializedContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<org.apache.flink.table.types.DataType>getArgumentDataTypes()org.apache.flink.table.types.DataTypegetOutputDataType()Set<org.apache.flink.table.functions.FunctionRequirement>getRequirements()org.apache.flink.table.types.inference.TypeInferencegetTypeInference(org.apache.flink.table.catalog.DataTypeFactory typeFactory)booleanisDeterministic()-
Methods inherited from class org.apache.flink.table.functions.ScalarFunction
getKind, getParameterTypes, getResultType
-
Methods inherited from class org.apache.flink.table.functions.UserDefinedFunction
close, functionIdentifier, open, toString
-
-
-
-
Method Detail
-
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:
getTypeInferencein interfaceorg.apache.flink.table.functions.FunctionDefinition- Overrides:
getTypeInferencein classorg.apache.flink.table.functions.ScalarFunction
-
getRequirements
public Set<org.apache.flink.table.functions.FunctionRequirement> getRequirements()
-
isDeterministic
public boolean isDeterministic()
-
-