Skip to content

Commit 0248d48

Browse files
authored
SNOW-1269820: Structured Type support for pandas and iceberg. (#1907)
1 parent 1f7321e commit 0248d48

File tree

6 files changed

+646
-323
lines changed

6 files changed

+646
-323
lines changed

DESCRIPTION.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ Source code is also available at: https://github.com/snowflakedb/snowflake-conne
1616

1717
- Added easy logging configuration so that users can easily generate log file by setup log config in `$SNOWFLAKE_HOME/config.toml`.
1818
- Improved s3 acceleration logic when connecting to China endpoint.
19+
- Added support for structured types to fetch_pandas_all
1920

2021
- v3.8.1(April 09, 2024)
2122

src/snowflake/connector/cursor.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1314,7 +1314,17 @@ def fetch_pandas_batches(self, **kwargs: Any) -> Iterator[DataFrame]:
13141314
return self._result_set._fetch_pandas_batches(**kwargs)
13151315

13161316
def fetch_pandas_all(self, **kwargs: Any) -> DataFrame:
1317-
"""Fetch Pandas dataframes in batches, where 'batch' refers to Snowflake Chunk."""
1317+
"""
1318+
Fetch Pandas dataframes in batches, where 'batch' refers to Snowflake Chunk.
1319+
1320+
Returns:
1321+
A pandas dataframe containing the cursors query results.
1322+
1323+
Note:
1324+
Timestamp types that are nested in structured types may not be accurately represented
1325+
due to a limitation in the pyarrow to pandas conversion.
1326+
See here for more information: https://github.com/apache/arrow/issues/4116
1327+
"""
13181328
self.check_can_use_pandas()
13191329
if self._prefetch_hook is not None:
13201330
self._prefetch_hook()

0 commit comments

Comments
 (0)