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
Catalog
or is provided by aModule
as 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 uniqueFunctionIdentifier
and 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,BuiltInFunctionDefinition
s 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
CallExpression
which 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
-
-
-
Method Detail
-
permanent
public static ContextResolvedFunction permanent(FunctionIdentifier functionIdentifier, FunctionDefinition functionDefinition)
-
permanent
public static ContextResolvedFunction permanent(FunctionIdentifier functionIdentifier, FunctionDefinition functionDefinition, CatalogFunction catalogFunction)
-
temporary
public static ContextResolvedFunction temporary(FunctionIdentifier functionIdentifier, FunctionDefinition functionDefinition)
-
temporary
public static ContextResolvedFunction temporary(FunctionIdentifier functionIdentifier, FunctionDefinition functionDefinition, CatalogFunction catalogFunction)
-
anonymous
public static ContextResolvedFunction anonymous(FunctionDefinition functionDefinition)
-
fromCallExpression
public static ContextResolvedFunction fromCallExpression(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<FunctionIdentifier> getIdentifier()
-
getDefinition
public FunctionDefinition getDefinition()
-
getCatalogFunction
public CatalogFunction getCatalogFunction()
-
asSummaryString
public String asSummaryString()
-
toCallExpression
public CallExpression toCallExpression(List<ResolvedExpression> resolvedArgs, DataType outputDataType)
-
-