public interface FunctionTyper
ScalarValuedFunction
. A number of implementations
are provided which cover common use cases.
A FunctionTyper
is used as part of a function description
to provide type checking of arguments and to determine the
type of the output buffer. Because descriptions are serialized within the
framework, implementations of FunctionTyper
must also
be serializable as JSON.
ScalarValuedFunction
,
ScalarFunctionDescriptor
Modifier and Type | Method and Description |
---|---|
ScalarTokenType |
computeResultType(FunctionContext ctx)
Calculates the result type for the function given the
provided context.
|
ScalarTokenType |
computeUpperBound(FunctionContext ctx)
Calculates the upper bound for the function given the
provided context.
|
ScalarTokenType computeUpperBound(FunctionContext ctx)
The context contains the upper bounds on the types of
all arguments to the function. If a argument is not
a subclass of ScalarValuedFunction
, its type
is null
.
ctx
- the context of the function being processedScalarTokenType computeResultType(FunctionContext ctx)
The context contains the actual result types of
all arguments to the function. If a argument is not
a subclass of ScalarValuedFunction
, its type
is null
.
ctx
- the context of the function being processedCopyright © 2024 Actian Corporation. All rights reserved.