datafusion icon indicating copy to clipboard operation
datafusion copied to clipboard

feat: support named parameters for table functions

Open bubulalabu opened this issue 2 months ago • 0 comments

Which issue does this PR close?

no issue, it's a follow up PR for https://github.com/apache/datafusion/pull/18535

Rationale for this change

Table functions currently only support positional arguments. This PR adds support for named parameters (e.g., batched_generate_series(stop => 5, start => 1)) to match the functionality already available for scalar, aggregate, and window functions.

Are there any user-facing changes?

Yes. Users can now call batched table functions with named parameters:

-- Arguments can be specified out of order
SELECT * FROM batched_generate_series(stop => 10, start => 1);

-- Mix positional and named (positional must come first)
SELECT * FROM batched_generate_series(1, stop => 10);

-- Works in LATERAL joins too
SELECT t.id, value
FROM my_table t
CROSS JOIN LATERAL batched_generate_series(start => t.start_col, stop => t.end_col);

This is purely additive - existing positional argument calls continue to work as before.

bubulalabu avatar Dec 09 '25 10:12 bubulalabu