-
Notifications
You must be signed in to change notification settings - Fork 1.1k
fix: Change panic to error intake kernel for StringArrary/BinaryArray on overflow
#7793
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
Conversation
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @chenkovsky -- the idea looks good to me but I worry about performance implications. Let's see what the benchmarks say
| DictionaryKeyOverflowError, | ||
| /// Error when the run end index in a REE array is bigger than the array length | ||
| RunEndIndexOverflowError, | ||
| /// Error when the offset overflows. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is a breaking API change but probably a reasonable one given we are about to open main for development of 0.56.0
|
|
||
| let (offsets, values) = if array.null_count() == 0 && indices.null_count() == 0 { | ||
| offsets.extend(indices.values().iter().map(|index| { | ||
| offsets.reserve(indices.len()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am worried this change will cause a non trivial performance regression. I will run some benchmarks
|
🤖 |
|
🤖: Benchmark completed Details
|
|
The performance runs show mixed results. I'll rerun them to see if they are reproduceable |
take kernel for strings instead of panicking on overflow
take kernel for strings instead of panicking on overflowtake kernel for String/BinaryArray on overflow
take kernel for String/BinaryArray on overflowtake kernel for StringArrary/BinaryArray on overflow
|
🤖 |
|
🤖: Benchmark completed Details
|
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @chenkovsky -- this looks good to me
Which issue does this PR close?
Rationale for this change
arrow will panic if offset overflows.
What changes are included in this PR?
return an error instead of panic.
Are these changes tested?
UT
Are there any user-facing changes?
No