- Notifications
You must be signed in to change notification settings - Fork126
[PECO-1117] Allow legacy codepath for parameterized queries to be used.#241
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
src/databricks/sql/client.py Outdated
| """ | ||
| ifparametersisNone: | ||
| parameters= [] | ||
| elifself.thrift_backend._use_legacy_parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think we need to add unit tests to cover the behavior. Any new code should have unit tests.
What about an app which can connect to different dbrs (thinking of dbt). This new property can serve as a forcing function but the default behaviors should be allow the client code to continue to function. Would you check the server version and decide to use the server support or the old client support of the server does not support it?
If it is going to be addressed in a separate PR, it's fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We'll circulate a document internally about this decision. I don't think it should be handled / discussed in the Github code review comments as this isn't great visibility across the team.
Agree that this code should be tested and should not merge without tests.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| elifself.thrift_backend._use_legacy_parameters: | |
| elifself.thrift_backend._use_inline_params: |
I'd propose naming this as obviously unsafe / inline sincelegacy isn't indicative of what the change actuallydoes.
yunbodeng-db commentedOct 3, 2023
Please sign your DCO. It's easy to do it now before you have more commits later. |
susodapop left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Don't merge this. We'll circulate a document internally so we can have multiple eyes on the design.
src/databricks/sql/client.py Outdated
| """ | ||
| ifparametersisNone: | ||
| parameters= [] | ||
| elifself.thrift_backend._use_legacy_parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We'll circulate a document internally about this decision. I don't think it should be handled / discussed in the Github code review comments as this isn't great visibility across the team.
Agree that this code should be tested and should not merge without tests.
src/databricks/sql/client.py Outdated
| """ | ||
| ifparametersisNone: | ||
| parameters= [] | ||
| elifself.thrift_backend._use_legacy_parameters: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
| elifself.thrift_backend._use_legacy_parameters: | |
| elifself.thrift_backend._use_inline_params: |
I'd propose naming this as obviously unsafe / inline sincelegacy isn't indicative of what the change actuallydoes.
susodapop commentedNov 1, 2023
Closing as we implemented this in#267 with tests. |
We need to allow for parameterized queries to be used in a legacy matter.