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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContextResolvedFunction
anonymous(org.apache.flink.table.functions.FunctionDefinition functionDefinition)
String
asSummaryString()
boolean
equals(Object o)
static ContextResolvedFunction
fromCallExpression(org.apache.flink.table.expressions.CallExpression callExpression)
org.apache.flink.table.functions.FunctionDefinition
getDefinition()
Optional<org.apache.flink.table.functions.FunctionIdentifier>
getIdentifier()
int
hashCode()
boolean
isAnonymous()
boolean
isPermanent()
boolean
isTemporary()
static ContextResolvedFunction
permanent(org.apache.flink.table.functions.FunctionIdentifier functionIdentifier, org.apache.flink.table.functions.FunctionDefinition functionDefinition)
static ContextResolvedFunction
temporary(org.apache.flink.table.functions.FunctionIdentifier functionIdentifier, org.apache.flink.table.functions.FunctionDefinition functionDefinition)
org.apache.flink.table.expressions.CallExpression
toCallExpression(List<org.apache.flink.table.expressions.ResolvedExpression> resolvedArgs, org.apache.flink.table.types.DataType outputDataType)
String
toString()
-
-
-
Method Detail
-
permanent
public static ContextResolvedFunction permanent(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)
-
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()
-
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)
-
-