-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Wrong parameters order in EXECUTE USING
when using with
clause
#1191
Comments
I would expect parameter order to be the same independently whether |
The issue seems to be that AstBuilder part calls visitParameter for the query first and the With statement later, hence the id assigned to paramter corresponding to @sopel39 Need help to figure out how to make sure that with part is processed first so that parameter ids are allocated in sequential order |
What we need to do walk the query tree and collect all the parameters, sort them by their location and record them in the analysis. Btw, I think @Praveen2112 is also looking into this, so please coordinate with him to avoid duplicating work. |
So, the position should not be recorded during analysis, not during parsing. The tricky bit is going to be |
@martint Had an offline discussion with @Praveen2112, he is taking this forward.
|
env
If using
with
clauseMybatis handle with left-to-right as they appear
But Presto is expecting
If without
with
clausePresto is expecting the same order as mybatis is generated
The text was updated successfully, but these errors were encountered: