Class TableFunctionInfo
java.lang.Object
se.kuseman.payloadbuilder.api.catalog.FunctionInfo
se.kuseman.payloadbuilder.api.catalog.TableFunctionInfo
Definition of a table valued function. These functions are applied row by row.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classException that can be thrown during schema resolving for TVS to properly trigg compile exception.Nested classes/interfaces inherited from class se.kuseman.payloadbuilder.api.catalog.FunctionInfo
FunctionInfo.Arity, FunctionInfo.FunctionType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract TupleIteratorexecute(IExecutionContext context, String catalogAlias, Optional<Schema> schema, List<IExpression> arguments, IDatasourceOptions options) Execute table function.execute(IExecutionContext context, String catalogAlias, Optional<Schema> schema, List<IExpression> arguments, IDatasourceOptions options, int nodeId) getDescribeProperties(IExecutionContext context) Returns a map with describe properties that is used during describe/analyze statementsgetSchema(List<IExpression> arguments) Return the schema for this function.getSchema(List<IExpression> arguments, List<Option> options) Return the schema for this function.Methods inherited from class se.kuseman.payloadbuilder.api.catalog.FunctionInfo
arity, equals, getDescription, getFunctionType, getName, hashCode, requiresNamedArguments, toString
-
Constructor Details
-
TableFunctionInfo
-
-
Method Details
-
getSchema
Return the schema for this function. NOTE! If schema cannot be resolved throw aTableFunctionInfo.SchemaResolveException -
getSchema
Return the schema for this function. NOTE! If schema cannot be resolved throw aTableFunctionInfo.SchemaResolveException -
execute
public TupleIterator execute(IExecutionContext context, String catalogAlias, Optional<Schema> schema, List<IExpression> arguments, IDatasourceOptions options, int nodeId) - Parameters:
nodeId- The id of the functions node id the query plan tree. Can be used to get hold of node data fromIStatementContextto store statistics during execution etc.- See Also:
-
execute
public abstract TupleIterator execute(IExecutionContext context, String catalogAlias, Optional<Schema> schema, List<IExpression> arguments, IDatasourceOptions options) Execute table function.- Parameters:
context- Execution contextcatalogAlias- The query specific catalog alias used in this invocationschema- Planned schema for this table function. If this has a value then the schema should be used when returningTupleVector' fromTupleIterator. Else value will beOptional.empty()and the actual runtime schema should be return for vectors.arguments- Function argumentsoptions- Options for this table source such as batch size etc.
-
getDescribeProperties
Returns a map with describe properties that is used during describe/analyze statements
-