Skip to content

Conversation

@bubulalabu
Copy link
Contributor

@bubulalabu bubulalabu commented Dec 9, 2025

Which issue does this PR close?

no issue, it's a follow up PR for #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.

@github-actions github-actions bot added sql SQL Planner logical-expr Logical plan and expressions optimizer Optimizer rules core Core DataFusion crate sqllogictest SQL Logic Tests (.slt) substrait Changes to the substrait crate catalog Related to the catalog crate proto Related to proto crate functions Changes to functions implementation physical-plan Changes to the physical-plan crate labels Dec 9, 2025
@bubulalabu bubulalabu marked this pull request as draft December 9, 2025 10:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

catalog Related to the catalog crate core Core DataFusion crate functions Changes to functions implementation logical-expr Logical plan and expressions optimizer Optimizer rules physical-plan Changes to the physical-plan crate proto Related to proto crate sql SQL Planner sqllogictest SQL Logic Tests (.slt) substrait Changes to the substrait crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant