-
Notifications
You must be signed in to change notification settings - Fork 129
Correct handling parameter #491
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
Conversation
@Leo-XM-Zeng thx for the pr, can you check whether Mooncake-Labs/pg_mooncake@a6262b1 would be an easier way to fix the same issue? |
Wow, a simpler change. My implementation is handled from a PostgreSQL perspective because my understanding of DuckDB is not as deep as PostgreSQL's. I can't judge whether your changes are good or bad, perhaps we need to consult someone who has a deeper understanding of these. @JelteF |
Looking at the changes linked by @zhousun, those are indeed quite simple: They let duckdb figure out what parameters are in the query, and then we only pass those parameters to duckdb from the full set of parameters that postgres has. If that indeed solves all these issues, then I like that approach better than us traversing the query tree ourselves to find all the parameters. @zhousun are you okay with @Leo-XM-Zeng changing this PR to incorporate those changes? |
@zhousun Your code is much more perfect than mine, I just tested and validated it and found that it handles these scenarios much better. That would be a better solution. |
If you want to submit your own PR, I will turn this off at that time, the current PR code is from you, I just added some test cases. |
@Leo-XM-Zeng just take it :) |
Thank you ~ 😀 |
Thanks both, I used the |
Hello, I was wondering if this bug has been fixed? checked in which version? Thanks. |
DuckDB complains when it receives parameters that were not actually used in the query. From Postgres we get all supplied parameters though. So this changes the code to filter the unused ones out. To do this we lot DuckDB parse the query and tell us which parameters it expects, and then we remove the unexpected ones.
Fixes #411
Fixes #234