Package org.apache.gravitino.function
Interface FunctionDefinition
- All Known Implementing Classes:
FunctionDefinitionDTO
A function definition that pairs a specific parameter list with its implementations and return
type. A single function can include multiple definitions (overloads), each with distinct
parameters and implementations. Overload resolution is based on parameters only; return type or
return columns are metadata and do not participate in definition matching.
For scalar or aggregate functions, use returnType() to specify the return type. For
table-valued functions, use returnColumns() to specify the output columns.
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionimpls()default FunctionColumn[]The output columns for a table-valued function definition.default TypeThe return type for scalar or aggregate function definitions.
-
Field Details
-
EMPTY_COLUMNS
An empty array ofFunctionColumn.
-
-
Method Details
-
parameters
FunctionParam[] parameters()- Returns:
- The parameters for this definition. Maybe an empty array for a no-arg definition.
-
returnType
The return type for scalar or aggregate function definitions.- Returns:
- The return type, or null if this is a table-valued function definition.
-
returnColumns
The output columns for a table-valued function definition.A table-valued function is a function that returns a table instead of a scalar value or an aggregate result. The returned table has a fixed schema defined by the columns returned from this method.
- Returns:
- The output columns that define the schema of the table returned by this definition, or an empty array if this is a scalar or aggregate function definition.
-
impls
FunctionImpl[] impls()- Returns:
- The implementations associated with this definition.
-