You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Compiled sql for an input list parameter results in incorrect syntax in 4.0.4 #629
I'm 100% sure that the author (jprakash-db) of the PR (#559) will kindly inform you why it looks like this and how to use it in your code as it seems like it's not backwards compatible change that's potentially error prone released as part of a patch release.
Or maybe you should just open your PR as that won't ever happen, the PR wasn't tested properly and fix it yourself!
Thanks for raising this issue. We implemented this approach to parse all the sequence objects as ARRAY is because of the upstream requirement of https://github.com/databricks/databricks-sqlalchemy . Support for complex types in sqlalchemy does not give us additional information of specific types to the PySQL Connector.
As a workaround you can use this cursor.execute("SELECT * FROM table_name WHERE array_contains(:user_nums, user_num)", {"user_nums": [434]}) instead of the IN syntax
How does that workaround resolve this? Not supporting correct sql syntax for the databricks dialect due to design constraints in a separate tool points to a problem with the design that should be fixed.
Activity
p-mit commentedon Sep 3, 2025
I'm 100% sure that the author (jprakash-db) of the PR (#559) will kindly inform you why it looks like this and how to use it in your code as it seems like it's not backwards compatible change that's potentially error prone released as part of a patch release.
Or maybe you should just open your PR as that won't ever happen, the PR wasn't tested properly and fix it yourself!
yeiterjoe commentedon Jan 6, 2026
Running into the same issue myself. #559 broke all usages of parameters used with
instatements.IMO SQL Arrays should have been handled with a specific parameter class rather than just converting all list parameters to Arrays.
jprakash-db commentedon Mar 16, 2026
Thanks for raising this issue. We implemented this approach to parse all the sequence objects as ARRAY is because of the upstream requirement of https://github.com/databricks/databricks-sqlalchemy . Support for complex types in sqlalchemy does not give us additional information of specific types to the PySQL Connector.
As a workaround you can use this
cursor.execute("SELECT * FROM table_name WHERE array_contains(:user_nums, user_num)", {"user_nums": [434]})instead of the IN syntaxPlease feel free to reopen if needed. Thanks
jwhite3 commentedon Mar 17, 2026
How does that workaround resolve this? Not supporting correct sql syntax for the databricks dialect due to design constraints in a separate tool points to a problem with the design that should be fixed.
jprakash-db commentedon Mar 18, 2026
Ack, have reopened the issue.
jprakash-db commentedon Mar 18, 2026
@msrathore-db Tagging in current oncall to evaluate this issue
gyandeeps-hh commentedon Apr 7, 2026
is their a fix in the works? we have a pinned our version and which is not a good thing for long term support.
fatkobra commentedon Apr 20, 2026
I worked on this and put PR #773 .
Added a small inline-parameter fix in
src/databricks/sql/utils.py.Then I added unit tests (regression tests) for inline list parameters used in
INclauses.