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

[C++][Compute] Prefer TypeError over Invalid in IndexIn and IsIn kernels #36345

Closed
js8544 opened this issue Jun 28, 2023 · 0 comments · Fixed by #36358
Closed

[C++][Compute] Prefer TypeError over Invalid in IndexIn and IsIn kernels #36345

js8544 opened this issue Jun 28, 2023 · 0 comments · Fixed by #36358

Comments

@js8544
Copy link
Collaborator

js8544 commented Jun 28, 2023

Describe the enhancement requested

When input type and value_set type miss match, TypeError should be used instead of Invalid.

Component(s)

C++

js8544 added a commit to js8544/arrow that referenced this issue Jun 28, 2023
pitrou pushed a commit that referenced this issue Jun 29, 2023
…nels (#36358)

### Rationale for this change

`TypeError` should be returned when `values` and `value_set` have incompatible types in IsIn and IndeIx.
`Invalid` is still returned if the types are compatible but casting the values fails (for example because of overflow or truncation).

### What changes are included in this PR?

When casting between types is not supported, return TypeError instead of Invalid.

### Are these changes tested?

Yes.

### Are there any user-facing changes?

No.

* Closes: #36345

Authored-by: Jin Shang <shangjin1997@gmail.com>
Signed-off-by: Antoine Pitrou <antoine@python.org>
@pitrou pitrou added this to the 13.0.0 milestone Jun 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants