Skip to content
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

[Python] Table should fail gracefully on non-cpu devices #43973

Closed
Tracked by #41665
danepitkin opened this issue Sep 5, 2024 · 1 comment
Closed
Tracked by #41665

[Python] Table should fail gracefully on non-cpu devices #43973

danepitkin opened this issue Sep 5, 2024 · 1 comment

Comments

@danepitkin
Copy link
Member

Describe the enhancement requested

PyArrow should raise a python exception instead of segfault when a Table API doesn't support executing on non-cpu memory.

Component(s)

Python

jorisvandenbossche added a commit that referenced this issue Sep 11, 2024
## Rationale for this change

Table APIs should throw python exception instead of segfault if they don't support operating on non-cpu memory.

### What changes are included in this PR?

* Add is_cpu() property to Table
* Add _assert_cpu() checks to Table APIs that only support operating on cpu memory

### Are these changes tested?

* Unit tests

### Are there any user-facing changes?

No, besides receiving a friendlier error in certain scenarios.
* GitHub Issue: #43973

Lead-authored-by: Dane Pitkin <dpitkin@apache.org>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
@jorisvandenbossche jorisvandenbossche added this to the 18.0.0 milestone Sep 11, 2024
@jorisvandenbossche
Copy link
Member

Issue resolved by pull request 43974
#43974

khwilson pushed a commit to khwilson/arrow that referenced this issue Sep 14, 2024
…pache#43974)

## Rationale for this change

Table APIs should throw python exception instead of segfault if they don't support operating on non-cpu memory.

### What changes are included in this PR?

* Add is_cpu() property to Table
* Add _assert_cpu() checks to Table APIs that only support operating on cpu memory

### Are these changes tested?

* Unit tests

### Are there any user-facing changes?

No, besides receiving a friendlier error in certain scenarios.
* GitHub Issue: apache#43973

Lead-authored-by: Dane Pitkin <dpitkin@apache.org>
Co-authored-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants