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

The binary function should not panic on unequaled array length. #2721

Closed
HaoYang670 opened this issue Sep 13, 2022 · 1 comment · Fixed by #2750
Closed

The binary function should not panic on unequaled array length. #2721

HaoYang670 opened this issue Sep 13, 2022 · 1 comment · Fixed by #2750
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog good first issue Good for newcomers

Comments

@HaoYang670
Copy link
Contributor

Is your feature request related to a problem or challenge? Please describe what you are trying to do.
We've seen somewhere in the code that there are duplicate length checking because binary panics on unequaled length:
https://github.com/apache/arrow-rs/blob/master/arrow/src/compute/kernels/arithmetic.rs#L60-L77
https://github.com/apache/arrow-rs/blob/master/arrow/src/compute/kernels/arity.rs#L188

Describe the solution you'd like

  1. It is bettter to let the result type of binary be Result and return an error when arrays have different length.
  2. We should also update the docs to comment when the function will return an error or panic

Describe alternatives you've considered
We could not do this.

Additional context

@HaoYang670 HaoYang670 added enhancement Any new improvement worthy of a entry in the changelog good first issue Good for newcomers labels Sep 13, 2022
@alamb alamb added the arrow Changes to the arrow crate label Sep 30, 2022
@alamb
Copy link
Contributor

alamb commented Sep 30, 2022

label_issue.py automatically added labels {'arrow'} from #2750

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate enhancement Any new improvement worthy of a entry in the changelog good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants