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

Escape and subtitute query arguments client side #100

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nyergler
Copy link
Contributor

Coming from other Go database drivers the lack of query argument support was a surprise. This commit ports approximately what the Python Databricks library does in order to handle query arguments.

Feedback, suggestions, etc welcome!

This commit ports approximately what the Python Databricks library does
in order to handle query arguments.
Copy link
Contributor

@andrefurlan-db andrefurlan-db left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we explicitly did not add support for this. The feature is under development in spark and databricks. We'll add support for the driver once the backend is ready.

@nyergler
Copy link
Contributor Author

Got it, @andrefurlan-db . Is there an expected timeline for that development? I'm sure there's a lot in flight, just curious how far along that is.

@moderakh moderakh removed their request for review April 25, 2023 18:55
@nohajc
Copy link

nohajc commented May 1, 2023

I did a bit of digging and it seems the parametrized query feature has been released in Spark 3.4.0 (merged since December 2022). However, it is not exposed in the thrift server which is used by databricks-sql-go to connect to Spark.
https://issues.apache.org/jira/browse/SPARK-41271
apache/spark#38864
https://github.com/apache/spark/blob/master/sql/hive-thriftserver/src/main/scala/org/apache/spark/sql/hive/thriftserver/SparkExecuteStatementOperation.scala#L226

To me it looks like the feature is ready but not exposed to external clients.

@kravets-levko
Copy link
Collaborator

kravets-levko commented Apr 16, 2024

Hi @nohajc! The library got a support for named query parameters since v1.5.0. Can you please try it and let us know if it works for you? Thanks!

@nohajc
Copy link

nohajc commented Apr 16, 2024

Hi, thank you for the information. I noticed the support has been added but I'm not using databricks at the moment. When I come back to it at some point, I will definitely try.

Cheers!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants