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

Optimized slicing #1285

Merged
merged 1 commit into from
Oct 30, 2022
Merged

Optimized slicing #1285

merged 1 commit into from
Oct 30, 2022

Conversation

jorgecarleitao
Copy link
Owner

@jorgecarleitao jorgecarleitao commented Oct 30, 2022

This PR drops the validity on slice and slice_unchecked when the resulting array has no null values. This:

  • drops strong ref count, therefore allowing the validity to be freed earlier.
  • allows users of the arrays to not have to check the validity's unset bits to branch an the faster case where there are no null values

Follow up of #1284

@jorgecarleitao jorgecarleitao added the enhancement An improvement to an existing feature label Oct 30, 2022
@codecov
Copy link

codecov bot commented Oct 30, 2022

Codecov Report

Base: 83.02% // Head: 83.00% // Decreases project coverage by -0.01% ⚠️

Coverage data is based on head (0bd58de) compared to base (cd985d4).
Patch coverage: 100.00% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1285      +/-   ##
==========================================
- Coverage   83.02%   83.00%   -0.02%     
==========================================
  Files         364      364              
  Lines       39136    39145       +9     
==========================================
+ Hits        32491    32492       +1     
- Misses       6645     6653       +8     
Impacted Files Coverage Δ
src/array/binary/mod.rs 91.55% <100.00%> (+1.00%) ⬆️
src/array/boolean/mod.rs 81.56% <100.00%> (+0.08%) ⬆️
src/array/fixed_size_binary/mod.rs 84.57% <100.00%> (+0.07%) ⬆️
src/array/fixed_size_list/mod.rs 82.20% <100.00%> (+0.10%) ⬆️
src/array/list/mod.rs 84.26% <100.00%> (+0.08%) ⬆️
src/array/map/mod.rs 59.37% <100.00%> (+0.25%) ⬆️
src/array/primitive/mod.rs 81.81% <100.00%> (+0.08%) ⬆️
src/array/struct_/mod.rs 61.66% <100.00%> (+0.21%) ⬆️
src/array/utf8/mod.rs 83.84% <100.00%> (+0.04%) ⬆️
src/array/equal/struct_.rs 46.34% <0.00%> (-24.40%) ⬇️
... and 3 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@jorgecarleitao jorgecarleitao merged commit ba26425 into main Oct 30, 2022
@jorgecarleitao jorgecarleitao deleted the optimized_slice branch October 30, 2022 22:01
ritchie46 pushed a commit to ritchie46/arrow2 that referenced this pull request Nov 6, 2022
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.

1 participant