SNOW-3243341: python wrapper - support pandas and pyarrow fetching#653
Merged
sfc-gh-asolarski merged 1 commit intomainfrom Mar 26, 2026
Conversation
This was referenced Mar 20, 2026
This was referenced Mar 20, 2026
Contributor
Author
bf54370 to
ba1f2bc
Compare
4d0bc36 to
b4692bf
Compare
ba1f2bc to
b593112
Compare
ce4fb08 to
1e58685
Compare
b593112 to
2ff7ed5
Compare
| @@ -0,0 +1,870 @@ | |||
| #include "ArrowTableConverter.hpp" | |||
Contributor
There was a problem hiding this comment.
Is this copy past or new implementation?
Contributor
Author
There was a problem hiding this comment.
extract from old nanoarrow CArrowStreamTableIterator
Contributor
Author
There was a problem hiding this comment.
CArrowStreamTableIterator is new
sfc-gh-turbaszek
requested changes
Mar 23, 2026
Comment on lines
+169
to
+172
| if is_old_driver(): | ||
| cursor.connection.arrow_number_to_decimal_setter = True | ||
| else: | ||
| cursor.connection.arrow_number_to_decimal = True |
Contributor
There was a problem hiding this comment.
It's not necessary, old driver supports arrow_number_to_decimal
Contributor
Author
There was a problem hiding this comment.
The thing is that there is a bug in the old driver (the method name of the setter is wrong), hence it must be used like this.
2ff7ed5 to
c014065
Compare
1e58685 to
c91a26d
Compare
c014065 to
7d64026
Compare
c91a26d to
7963d70
Compare
7963d70 to
7ddb233
Compare
7d64026 to
7dc9897
Compare
7dc9897 to
7d8a3ed
Compare
7ddb233 to
e0b4b64
Compare
7d8a3ed to
7817b1c
Compare
e0b4b64 to
9a6b030
Compare
7817b1c to
acf2477
Compare
acf2477 to
dcdd93e
Compare
9a6b030 to
4d7034a
Compare
dcdd93e to
6af3814
Compare
Base automatically changed from
03-24-snow-3243341_python_decorators_for_required_conditions_in_cursor
to
main
March 24, 2026 15:42
9bf8999 to
b2a1f1b
Compare
b2a1f1b to
3fc02a0
Compare
3fc02a0 to
d1c0313
Compare
# Conflicts: # python/src/snowflake/connector/cursor.py # Conflicts: # python/tests/unit/test_connection.py
d1c0313 to
ce0a78b
Compare
sfc-gh-turbaszek
approved these changes
Mar 26, 2026
This was referenced Mar 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

TL;DR
Added support for Arrow/Pandas fetch methods (
fetch_arrow_all,fetch_arrow_batches,fetch_pandas_all,fetch_pandas_batches) to the Snowflake Python connector by implementing a new stream-based Arrow table iterator with Snowflake-specific type conversions.What changed?
ArrowTableConverterclass to handle Snowflake-specific type conversions (scaled numbers, timestamps, etc.) andCArrowStreamTableIteratorfor stream-based Arrow batch processingfetch_arrow_all,fetch_arrow_batches,fetch_pandas_all, andfetch_pandas_batchesmethods in the cursor classarrow_number_to_decimalproperty to control numeric type conversion behavior