-
Notifications
You must be signed in to change notification settings - Fork 171
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
SNOW-1675555: Snowflake Pivot Fails to bind parameter in CTE when pivoted #1899
Comments
Sorry to ping you all @sfc-gh-wfateem @sfc-gh-aaaggarwal @sfc-gh-aaarora @sfc-gh-aahmadvand @sfc-gh-aalam, can anyone help here? |
also tagging in @sfc-gh-dprzybysz |
Thanks for the ping @paoliniluis @snoe |
Based on the examples and the errors you shared, I had the suspicion that this wasn't a JDBC driver issue but rather an issue at the backend. I tested something similar in Python and I was able to reproduce the issue:
That resulted in the same error you reported here:
I was even able to reproduce the issue with the SQL API. This was the body of my HTTP request:
This was the response:
I would suggest you consider opening a case directly with the Snowflake Support team to look into this particular issue. |
thanks so much @sfc-gh-wfateem, as always |
@paoliniluis @snoe, since this isn't a JDBC driver issue, I will go ahead and close this off for now. Please do reach out to Snowflake Support and raise this issue if it's something you need help with. |
Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!
What version of JDBC driver are you using?
Reproduces on 3.19.0 and 3.15.1
What operating system and processor architecture are you using?
macos, amd64
What version of Java are you using?
11.0.22
What did you do?
Based on metabase/metabase#45817 I reproduced that issue with straight JDBC calls. The bug seems to lie the shape of the query and trying to bind a preparedStatement parameter when it appears within the CTE and is then pivoted.
Query 1: This query fails:
The exception is:
Query 2: This query succeeds (hardcoded the param)
Query 3: This query succeeds (moved the
where
)Query 4: This query succeeds (removed the pivot):
The clojure code I used to test these queries.
What did you expect to see?
Query 1 should succeed with the same results as Query 2.
Can you set logging to DEBUG and collect the logs?
If it's necessary, I can.
The text was updated successfully, but these errors were encountered: