Skip to content

Convert a Prepare Logical Plan into a Logical Plan with all parameters replaced with values #4550

@NGA-TRAN

Description

@NGA-TRAN

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
This is a task of #4539 to take Prepare Logical Plan and a list of values of the parameters in the plan as input and output a Logical Plan with all parameters replaced with the corresponding provided values.

Describe the solution you'd like
Implement this function:

fn execute(plan: LogicalPlan, param_values: &Vec<ScalarVal>) -> Result<LogicalPlan>

If the plan is not a prepare plan, return itself.
If the plan is a prepare plan, recursively walk its input plan and replace all parameters ($1, $2, ...) with the corresponding param_values ($n will be replaced with param_values[n-1])

Describe alternatives you've considered
Unknown

Additional context
No

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