Skip to content

feat: support named parameters for table functions - #19230

Closed
bubulalabu wants to merge 18 commits into
apache:mainfrom
bubulalabu:xxxxx-support-named-parameters-for-table-functions
Closed

feat: support named parameters for table functions#19230
bubulalabu wants to merge 18 commits into
apache:mainfrom
bubulalabu:xxxxx-support-named-parameters-for-table-functions

Conversation

@bubulalabu

@bubulalabububulalabu commented Dec 9, 2025

Copy link
Copy Markdown
Contributor

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 orderSELECT*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 tooSELECTt.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-actionsgithub-actionsBot 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
@bubulalabu
bubulalabuforce-pushed the xxxxx-support-named-parameters-for-table-functions branch from ff8b582 to c0faaa2CompareDecember 11, 2025 09:57
@bubulalabu
bubulalabuforce-pushed the xxxxx-support-named-parameters-for-table-functions branch from c0faaa2 to 58cd14fCompareDecember 13, 2025 11:04
@alexanderbianchi

Copy link
Copy Markdown
Contributor

This is intended to be merged after #18535, could something similar be done for the current TableFunctionImpl?

@bubulalabu

Copy link
Copy Markdown
ContributorAuthor

No, the current TableFunctionImpl doesn't have a Signature which we need for named parameters.

@github-actions

Copy link
Copy Markdown

Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days.

@github-actionsgithub-actionsBot added the Stale PR has not had any activity for some time label Feb 18, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

catalogRelated to the catalog cratecoreCore DataFusion cratefunctionsChanges to functions implementationlogical-exprLogical plan and expressionsoptimizerOptimizer rulesphysical-planChanges to the physical-plan crateprotoRelated to proto cratesqlSQL PlannersqllogictestSQL Logic Tests (.slt)StalePR has not had any activity for some timesubstraitChanges to the substrait crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@bubulalabu@alexanderbianchi