Skip to content

Support named query parameters #8245

@simonvandel

Description

@simonvandel

Is your feature request related to a problem or challenge?

https://docs.rs/datafusion/latest/datafusion/dataframe/struct.DataFrame.html#method.with_param_values allows filling query parameters with values. However, each parameter is positional, so that it corresponds to $1,$2 and so forth.

In certain situations, it might be clearer to use named parameters, e.g $foo.

Describe the solution you'd like

Would it be possible to support named query parameters?

On a cursory look, it seems like the underlying LogicalPlan already supports mapping parameter ids to values, so this might "just" be to change the with_param_values API to allow specifying the named parameter ids.

Describe alternatives you've considered

Keep using positional query parameters.

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions