Skip to content

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

Closed

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

Activity

  1. NGA-TRAN commented on Dec 8, 2022

    @NGA-TRAN
    ContributorAuthor

    I am working on this

  2. changed the title [-]Convert a Prepare Logical Plan into its inner's Logical Plan with all parameters replaced with values[/-] [+]Convert a Prepare Logical Plan into a Logical Plan with all parameters replaced with values[/+] on Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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