-
Notifications
You must be signed in to change notification settings - Fork 473
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-1649438] add zstd decompressor in the urllib3 response #2043
base: main
Are you sure you want to change the base?
[SNOW-1649438] add zstd decompressor in the urllib3 response #2043
Conversation
All contributors have signed the CLA ✍️ ✅ |
I have read the CLA Document and I hereby sign the CLA |
recheck |
The PR looks good by me, how do you plan on testing your feature @sfc-gh-dbouassida ? Can you add some unit tests, or even some integration test? Or is manual testing the best we can do and if so please describe how you have tested this! @sfc-gh-aling can you guys chime in, please? Dhia's internship is ending soon! |
@@ -17,6 +17,23 @@ | |||
except ImportError: | |||
brotli = None | |||
|
|||
try: | |||
import zstandard as zstd |
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'm interested when the backend sends back zstd compressed data, is there a configuration?
also what error would connector trigger if it receives zstd compressed data but zstd is not installed in the execution env
@@ -126,6 +143,29 @@ def flush(self): | |||
return b"" | |||
|
|||
|
|||
if HAS_ZSTD: |
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'm curious when is this zstd feature introduced in the urllib?
Please answer these questions before submitting your pull requests. Thanks!
What GitHub issue is this PR addressing? Make sure that there is an accompanying issue to your PR.
SNOW-1649438
Fill out the following pre-review checklist:
Please describe how your code solves the related issue.
This PR adds support for decompressing zstd (Zstandard) compressed responses in the urllib3 response handler. Key changes:
This enhancement allows the Snowflake connector to properly handle and decompress zstd-compressed responses from the Snowflake service, to improve compatibility and performance.
Resolves: SNOW-1649438