Package org.apache.flink.table.catalog
Class ContextResolvedFunction
- java.lang.Object
-
- org.apache.flink.table.catalog.ContextResolvedFunction
-
@Internal public final class ContextResolvedFunction extends Object
This class contains information about a function and its relationship with aCatalog, if any.There can be 3 kinds of
ContextResolvedFunction:- A permanent function: a function which is stored in a
Catalogor is provided by aModuleas a system function. It always has an associated uniqueFunctionIdentifier. - A temporary function: a function which is stored in the
FunctionCatalog(either as a catalog or system function), has an associated uniqueFunctionIdentifierand is flagged as temporary. - An anonymous/inline function: a function which is not stored in a catalog or module and
doesn't have an associated unique
FunctionIdentifier. During Table API translation,BuiltInFunctionDefinitions are treated as anonymous functions in the API builders that get translated to permanent functions if available in theCoreModule.
This class is meant for internal usages. However, it needs to be kept in sync with the public
CallExpressionwhich contains similar context information. The convenience methodsfromCallExpression(CallExpression)andtoCallExpression(List, DataType)allow a symmetric conversion. - A permanent function: a function which is stored in a
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContextResolvedFunctionanonymous(org.apache.flink.table.functions.FunctionDefinition functionDefinition)StringasSummaryString()booleanequals(Object o)static ContextResolvedFunctionfromCallExpression(org.apache.flink.table.expressions.CallExpression callExpression)org.apache.flink.table.catalog.CatalogFunctiongetCatalogFunction()org.apache.flink.table.functions.FunctionDefinitiongetDefinition()Optional<org.apache.flink.table.functions.FunctionIdentifier>getIdentifier()inthashCode()booleanisAnonymous()booleanisPermanent()booleanisTemporary()static ContextResolvedFunctionpermanent(org.apache.flink.table.functions.FunctionIdentifier functionIdentifier, org.apache.flink.table.functions.FunctionDefinition functionDefinition)static ContextResolvedFunctionpermanent(org.apache.flink.table.functions.FunctionIdentifier functionIdentifier, org.apache.flink.table.functions.FunctionDefinition functionDefinition, org.apache.flink.table.catalog.CatalogFunction catalogFunction)static ContextResolvedFunctiontemporary(org.apache.flink.table.functions.FunctionIdentifier functionIdentifier, org.apache.flink.table.functions.FunctionDefinition functionDefinition)static ContextResolvedFunctiontemporary(org.apache.flink.table.functions.FunctionIdentifier functionIdentifier, org.apache.flink.table.functions.FunctionDefinition functionDefinition, org.apache.flink.table.catalog.CatalogFunction catalogFunction)org.apache.flink.table.expressions.CallExpressiontoCallExpression(List<org.apache.flink.table.expressions.ResolvedExpression> resolvedArgs, org.apache.flink.table.types.DataType outputDataType)StringtoString()
-
-
-
Method Detail
-
permanent
public static ContextResolvedFunction permanent(org.apache.flink.table.functions.FunctionIdentifier functionIdentifier, org.apache.flink.table.functions.FunctionDefinition functionDefinition)
-
permanent
public static ContextResolvedFunction permanent(org.apache.flink.table.functions.FunctionIdentifier functionIdentifier, org.apache.flink.table.functions.FunctionDefinition functionDefinition, org.apache.flink.table.catalog.CatalogFunction catalogFunction)
-
temporary
public static ContextResolvedFunction temporary(org.apache.flink.table.functions.FunctionIdentifier functionIdentifier, org.apache.flink.table.functions.FunctionDefinition functionDefinition)
-
temporary
public static ContextResolvedFunction temporary(org.apache.flink.table.functions.FunctionIdentifier functionIdentifier, org.apache.flink.table.functions.FunctionDefinition functionDefinition, org.apache.flink.table.catalog.CatalogFunction catalogFunction)
-
anonymous
public static ContextResolvedFunction anonymous(org.apache.flink.table.functions.FunctionDefinition functionDefinition)
-
fromCallExpression
public static ContextResolvedFunction fromCallExpression(org.apache.flink.table.expressions.CallExpression callExpression)
-
isAnonymous
public boolean isAnonymous()
-
isTemporary
public boolean isTemporary()
- Returns:
- true if the function is temporary. An anonymous function is always temporary.
-
isPermanent
public boolean isPermanent()
-
getIdentifier
public Optional<org.apache.flink.table.functions.FunctionIdentifier> getIdentifier()
-
getDefinition
public org.apache.flink.table.functions.FunctionDefinition getDefinition()
-
getCatalogFunction
public org.apache.flink.table.catalog.CatalogFunction getCatalogFunction()
-
asSummaryString
public String asSummaryString()
-
toCallExpression
public org.apache.flink.table.expressions.CallExpression toCallExpression(List<org.apache.flink.table.expressions.ResolvedExpression> resolvedArgs, org.apache.flink.table.types.DataType outputDataType)
-
-