-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Segfault in ByteGroupValueBuilder #15968
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
🤖 |
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 @thinkharderdev
I started the performance tests just to check, but realistically we need to fix this issue
datafusion/physical-plan/src/aggregates/group_values/multi_group_by/bytes.rs
Show resolved
Hide resolved
@@ -62,6 +64,11 @@ where | |||
buffer: BufferBuilder::new(INITIAL_BUFFER_CAPACITY), | |||
offsets: vec![O::default()], | |||
nulls: MaybeNullBufferBuilder::new(), | |||
max_buffer_size: if O::IS_LARGE { |
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 couldn't find any other way to get the max value of the offset size, which is weird. Maybe it would be a nice addition to arrow-rs
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.
Agreed: apache/arrow-rs#7474
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.
👍
🤖: Benchmark completed Details
|
Thanks all! |
Which issue does this PR close?
Rationale for this change
See issue description
What changes are included in this PR?
When appending values in
ByteGroupValueBuilder
we check for overflows of the underlyingOffsetSizeTrait
typeAre these changes tested?
There is a test which reproduces the segfault without this fix
Are there any user-facing changes?
No