Package dev.frostlake.executor.operators
Class TableFunctionOperator
java.lang.Object
dev.frostlake.executor.operators.TableFunctionOperator
- All Implemented Interfaces:
Operator
TABLE FUNCTION operator - executes table-valued functions.
This operator handles execution of table functions like GENERATOR,
RESULT_SCAN, and other table-valued functions that generate rows.
Table functions differ from regular operators as they don't take
input rows - they generate rows from scratch based on their arguments.
-
Constructor Summary
ConstructorsConstructorDescriptionTableFunctionOperator(String functionName, ResultSetProvider resultProvider) Create a table function operator with a custom result provider.TableFunctionOperator(String functionName, TableFunction tableFunction, List<Object> positionalArguments) Create a table function operator with positional arguments.TableFunctionOperator(String functionName, TableFunction tableFunction, Map<String, Object> namedArguments) Create a table function operator with named arguments. -
Method Summary
Modifier and TypeMethodDescriptionexecute(List<Row> input, OperatorContext context) Execute this operator on the input rows.Get a description of this operator for debugging/logging.
-
Constructor Details
-
TableFunctionOperator
public TableFunctionOperator(String functionName, TableFunction tableFunction, Map<String, Object> namedArguments) Create a table function operator with named arguments.- Parameters:
functionName- Name of the table functiontableFunction- The table function to executenamedArguments- Named arguments (e.g., ROWCOUNT => 10)
-
TableFunctionOperator
public TableFunctionOperator(String functionName, TableFunction tableFunction, List<Object> positionalArguments) Create a table function operator with positional arguments.- Parameters:
functionName- Name of the table functiontableFunction- The table function to executepositionalArguments- Positional arguments
-
TableFunctionOperator
Create a table function operator with a custom result provider. Useful for special cases like RESULT_SCAN with LAST_QUERY_ID().- Parameters:
functionName- Name of the table functionresultProvider- Provider that produces the ResultSet
-
-
Method Details
-
execute
Description copied from interface:OperatorExecute this operator on the input rows. -
getDescription
Description copied from interface:OperatorGet a description of this operator for debugging/logging.- Specified by:
getDescriptionin interfaceOperator- Returns:
- A human-readable description of the operator
-