Skip to content

SNOW-3243341: optional dependencies in cursor (pyarrow, pandas)#639

Open
sfc-gh-asolarski wants to merge 2 commits intomainfrom
03-19-snow-3243341_optional_dependencies_pyarrow_pandas_
Open

SNOW-3243341: optional dependencies in cursor (pyarrow, pandas)#639
sfc-gh-asolarski wants to merge 2 commits intomainfrom
03-19-snow-3243341_optional_dependencies_pyarrow_pandas_

Conversation

@sfc-gh-asolarski
Copy link
Contributor

No description provided.

Copy link
Contributor Author

sfc-gh-asolarski commented Mar 19, 2026


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • merge_queue - adds this PR to the back of the merge queue
  • priority_merge_queue - for urgent changes, fast-track this PR to the front of the merge queue

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_optional_dependencies_pyarrow_pandas_ branch from b00072e to a2458e8 Compare March 19, 2026 16:26
@sfc-gh-asolarski sfc-gh-asolarski changed the title SNOW-3243341: optional dependencies (pyarrow, pandas) SNOW-3243341: optional dependencies in cursor (pyarrow, pandas) Mar 19, 2026
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_optional_dependencies_pyarrow_pandas_ branch from a2458e8 to a722309 Compare March 20, 2026 09:16
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_e2e_tests_for_pyarrow_pandas_type_conversion branch from 3201d1d to fa645ee Compare March 20, 2026 09:16
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_e2e_tests_for_pyarrow_pandas_type_conversion branch from fa645ee to 5469b66 Compare March 20, 2026 10:09
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_optional_dependencies_pyarrow_pandas_ branch from a722309 to 4d0bc36 Compare March 20, 2026 10:09
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_optional_dependencies_pyarrow_pandas_ branch from 4d0bc36 to b4692bf Compare March 20, 2026 13:10
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_e2e_tests_for_pyarrow_pandas_type_conversion branch 2 times, most recently from 7e3c6db to 075543b Compare March 20, 2026 13:21
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_optional_dependencies_pyarrow_pandas_ branch from b4692bf to ce4fb08 Compare March 20, 2026 13:21
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_e2e_tests_for_pyarrow_pandas_type_conversion branch from 075543b to 905880c Compare March 20, 2026 14:34
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_optional_dependencies_pyarrow_pandas_ branch from ce4fb08 to 1e58685 Compare March 20, 2026 14:34
Comment on lines +828 to +832
msg = (
"Optional dependency: 'pyarrow' is not installed, please see the following link for"
" install instructions: https://docs.snowflake.com/en/user-guide/python-connector-pandas.html#installation"
)
raise ProgrammingError(msg=msg, errno=ER_NO_PYARROW)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't the message produced already in MissingOptionalDependency? If we have MissingPyarrow class it would be good to put all logic related to handling of it there . Especially that both arrow and pandas follow the same logic

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made this whole logic more generic for now.
Moved the creation of messages

@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_optional_dependencies_pyarrow_pandas_ branch from 1e58685 to c91a26d Compare March 23, 2026 11:53
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_e2e_tests_for_pyarrow_pandas_type_conversion branch 2 times, most recently from 99ec8bc to 78f826e Compare March 23, 2026 14:03
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_optional_dependencies_pyarrow_pandas_ branch from c91a26d to 7963d70 Compare March 23, 2026 14:03
@sfc-gh-asolarski sfc-gh-asolarski changed the base branch from 03-19-snow-3243341_e2e_tests_for_pyarrow_pandas_type_conversion to graphite-base/639 March 23, 2026 14:08
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_optional_dependencies_pyarrow_pandas_ branch from 7963d70 to 2bb35ba Compare March 23, 2026 15:30
@sfc-gh-asolarski sfc-gh-asolarski changed the base branch from graphite-base/639 to 03-19-snow-3243341_e2e_tests_for_pyarrow_pandas_type_conversion March 23, 2026 15:30
@sfc-gh-asolarski sfc-gh-asolarski changed the base branch from 03-19-snow-3243341_e2e_tests_for_pyarrow_pandas_type_conversion to graphite-base/639 March 23, 2026 15:33
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_optional_dependencies_pyarrow_pandas_ branch from 2bb35ba to c48200b Compare March 23, 2026 15:33
@sfc-gh-asolarski sfc-gh-asolarski changed the base branch from graphite-base/639 to 03-19-snow-3243341_e2e_tests_for_pyarrow_pandas_type_conversion March 23, 2026 15:34
ParamStyle,
)
from ._internal.decorators import pep249
from ._internal.options import check_dependency, pandas, pyarrow
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
from ._internal.options import check_dependency, pandas, pyarrow
from ._internal.extras import check_dependency, pandas, pyarrow

Given it's completely new module maybe it's worth to consider a naming that is more related to the package "extras"? WDYT?

@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_optional_dependencies_pyarrow_pandas_ branch from c48200b to 7ddb233 Compare March 23, 2026 19:52
@sfc-gh-asolarski sfc-gh-asolarski force-pushed the 03-19-snow-3243341_e2e_tests_for_pyarrow_pandas_type_conversion branch from 883c73a to 451213d Compare March 23, 2026 19:52
Base automatically changed from 03-19-snow-3243341_e2e_tests_for_pyarrow_pandas_type_conversion to main March 23, 2026 21:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants