@Internal public final class ContextResolvedFunction extends Object
Catalog
, if
any.
There can be 3 kinds of ContextResolvedFunction
:
Catalog
or is provided by a
Module
as a system function. It always has an associated unique FunctionIdentifier
.
FunctionCatalog
(either as
a catalog or system function), has an associated unique FunctionIdentifier
and is
flagged as temporary.
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 the CoreModule
.
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.
Modifier and Type | Method and Description |
---|---|
static ContextResolvedFunction |
anonymous(FunctionDefinition functionDefinition) |
String |
asSummaryString() |
boolean |
equals(Object o) |
static ContextResolvedFunction |
fromCallExpression(CallExpression callExpression) |
FunctionDefinition |
getDefinition() |
Optional<FunctionIdentifier> |
getIdentifier() |
int |
hashCode() |
boolean |
isAnonymous() |
boolean |
isPermanent() |
boolean |
isTemporary() |
static ContextResolvedFunction |
permanent(FunctionIdentifier functionIdentifier,
FunctionDefinition functionDefinition) |
static ContextResolvedFunction |
temporary(FunctionIdentifier functionIdentifier,
FunctionDefinition functionDefinition) |
CallExpression |
toCallExpression(List<ResolvedExpression> resolvedArgs,
DataType outputDataType) |
String |
toString() |
public static ContextResolvedFunction permanent(FunctionIdentifier functionIdentifier, FunctionDefinition functionDefinition)
public static ContextResolvedFunction temporary(FunctionIdentifier functionIdentifier, FunctionDefinition functionDefinition)
public static ContextResolvedFunction anonymous(FunctionDefinition functionDefinition)
public static ContextResolvedFunction fromCallExpression(CallExpression callExpression)
public boolean isAnonymous()
public boolean isTemporary()
public boolean isPermanent()
public Optional<FunctionIdentifier> getIdentifier()
public FunctionDefinition getDefinition()
public String asSummaryString()
public CallExpression toCallExpression(List<ResolvedExpression> resolvedArgs, DataType outputDataType)
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.