Skip to content
This repository has been archived by the owner on Feb 18, 2024. It is now read-only.

Speeded up min_max_boolean for the case where all values are null #1005

Merged

Conversation

HaoYang670
Copy link
Contributor

Signed-off-by: remzi 13716567376yh@gmail.com

Changes in the PR:
For a Boolean array without null value. We can simply get the max value by testing array.values.null_count < array.length and get the min value by testing array.values.null_count == 0.
Theoretically, the time complexity is O(1) as null_count is pre computed.

Signed-off-by: remzi <13716567376yh@gmail.com>
@codecov
Copy link

codecov bot commented May 23, 2022

Codecov Report

Merging #1005 (6fc959f) into main (a810b03) will increase coverage by 0.01%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1005      +/-   ##
==========================================
+ Coverage   71.44%   71.45%   +0.01%     
==========================================
  Files         356      356              
  Lines       19752    19758       +6     
==========================================
+ Hits        14112    14119       +7     
+ Misses       5640     5639       -1     
Impacted Files Coverage Δ
src/compute/aggregate/min_max.rs 75.36% <100.00%> (+1.11%) ⬆️
src/bitmap/utils/slice_iterator.rs 87.93% <0.00%> (+1.72%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a810b03...6fc959f. Read the comment docs.

@jorgecarleitao jorgecarleitao merged commit 6bfcd78 into jorgecarleitao:main May 24, 2022
@jorgecarleitao jorgecarleitao changed the title Speed up min_max_boolean Speeded up min_max_boolean for the case where all values are null May 24, 2022
@jorgecarleitao jorgecarleitao added the enhancement An improvement to an existing feature label May 24, 2022
@jorgecarleitao
Copy link
Owner

Thanks a lot, @HaoYang670 , indeed it is a quite faster case :)

@HaoYang670 HaoYang670 deleted the speed_up_min_max_boolean branch May 24, 2022 05:27
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement An improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants