Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
NGA-TRAN opened this issue Dec 8, 2022 · 1 comment · Fixed by #4561
Labels
enhancement New feature or request

Comments

@NGA-TRAN
Copy link
Contributor

NGA-TRAN commented Dec 8, 2022

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

@NGA-TRAN NGA-TRAN added the enhancement New feature or request label Dec 8, 2022
@NGA-TRAN
Copy link
Contributor Author

NGA-TRAN commented Dec 8, 2022

I am working on this

@NGA-TRAN NGA-TRAN 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 Dec 8, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant