-
Notifications
You must be signed in to change notification settings - Fork 839
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
Fix min/max computation for sliced arrays (#2779) #2780
Conversation
.data_ref() | ||
.null_buffer() | ||
.map(|b| b.bit_slice(array.offset(), array.len())); | ||
let null_buffer = array.data_ref().null_buffer(); |
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.
As an added bonus this will be faster. The bug is that BitIndexIterator is already applying the offset, and so it gets applied twice and we iterate a somewhat arbitrary part of the null mask.
(Note the way BitIndexIterator is written is that len acts to truncate the iteration, if len exceeds the data it doesn't panic it just stops early, perhaps it should)
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.
super speed. Thanks @tustvold !
I will try and test this against my upgrade PR as well |
Benchmark runs are scheduled for baseline = 06c204c and contender = a7cf274. a7cf274 is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
* Don't apply array offset twice (apache#2779) * More tests
Update is I have verified that this change fixes the regression in https://github.com/influxdata/influxdb_iox/pull/5694 |
Which issue does this PR close?
Closes #2779
Rationale for this change
The previous logic was incorrect
What changes are included in this PR?
#2675 introduced a bug when computing the min or max for sliced arrays, FYI @viirya
Are there any user-facing changes?