-
Notifications
You must be signed in to change notification settings - Fork 153
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
[Test PR] SNOW-892284: Fix boolean parameter parsing from URL query #446
Conversation
cache_column_metadata is a snowflake-sqlalchemy argument, not a snowflake-connector-python argument so it should be set and ommitted from the arguments list before the call to the connector is made.
Missing a CI run approval at the moment 😞 |
Continuing from the thread in #439 (can't post comments in closed PRs): sure, we can merge this PR, though at the moment it requires a review approval 😄 |
Requested approvals from @sfc-gh-aling and @snowflakedb/snowpark-python-api. |
) | ||
|
||
for name, value in query.items(): |
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 don't think I understand what this for-loop is doing, can you elaborate?
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 grab the parameter to type mapping used in validation of the driver arguments to figure out what are the expected types of each argument, then we pass the value to the driver according to these rules:
- if the parameter is not found in the type mapping, pass it through as a string
- if the expected type is
str
, pass it through as a string - if the expected type is
bool
, parse it and pass as a boolean - if it's some other type, pass it through as a string
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.
Thanks for the clarification. Let's maybe add it into the comment? :)
Duplicate of #439, which was closed accidentally.