Package org.apache.flink.table.catalog
Class ContextResolvedFunction
java.lang.Object
org.apache.flink.table.catalog.ContextResolvedFunction
This class contains information about a function and its relationship with a
Catalog, 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
CallExpression which contains similar context information. The convenience methods fromCallExpression(CallExpression) and toCallExpression(List, DataType) allow a
symmetric conversion.
-
Method Summary
Modifier and TypeMethodDescriptionstatic ContextResolvedFunctionanonymous(org.apache.flink.table.functions.FunctionDefinition functionDefinition) booleanstatic ContextResolvedFunctionfromCallExpression(org.apache.flink.table.expressions.CallExpression callExpression) org.apache.flink.table.catalog.CatalogFunctionorg.apache.flink.table.functions.FunctionDefinitionOptional<org.apache.flink.table.functions.FunctionIdentifier>inthashCode()booleanbooleanbooleanstatic 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) toString()
-
Method Details
-
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
-
getDefinition
public org.apache.flink.table.functions.FunctionDefinition getDefinition() -
getCatalogFunction
public org.apache.flink.table.catalog.CatalogFunction getCatalogFunction() -
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) -
toString
-
equals
-
hashCode
public int hashCode()
-