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

Added TryExtendFromSelf #1278

Merged
merged 1 commit into from Oct 30, 2022
Merged

Added TryExtendFromSelf #1278

merged 1 commit into from Oct 30, 2022

Conversation

jorgecarleitao
Copy link
Owner

This PR adds a trait implemented for most mutable arrays that tells how a mutable array extends from itself, fn try_extend_from_self(&mut self, other: &Self) -> Result<()>

This also adds some functions that were missing in mutable counterparts to make it more idiomatic to write them (such as Clone and from).

Closes #1268

@codecov
Copy link

codecov bot commented Oct 21, 2022

Codecov Report

Base: 83.02% // Head: 83.06% // Increases project coverage by +0.04% 🎉

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

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1278      +/-   ##
==========================================
+ Coverage   83.02%   83.06%   +0.04%     
==========================================
  Files         364      364              
  Lines       39136    39250     +114     
==========================================
+ Hits        32491    32603     +112     
- Misses       6645     6647       +2     
Impacted Files Coverage Δ
src/array/list/iterator.rs 38.70% <0.00%> (-27.96%) ⬇️
src/array/mod.rs 64.93% <ø> (ø)
src/array/physical_binary.rs 95.41% <76.00%> (-2.26%) ⬇️
src/array/binary/mod.rs 90.55% <100.00%> (ø)
src/array/binary/mutable.rs 78.36% <100.00%> (+1.54%) ⬆️
src/array/binary/mutable_values.rs 76.20% <100.00%> (+0.39%) ⬆️
src/array/boolean/mutable.rs 89.05% <100.00%> (+0.53%) ⬆️
src/array/fixed_size_binary/mod.rs 83.59% <100.00%> (-0.91%) ⬇️
src/array/fixed_size_binary/mutable.rs 84.45% <100.00%> (+2.47%) ⬆️
src/array/fixed_size_list/mutable.rs 71.22% <100.00%> (+3.28%) ⬆️
... and 10 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.

@TethysSvensson
Copy link

This looks good! 👍

@TethysSvensson
Copy link

Can you also implement it for MutableDictionaryArray ?

@jorgecarleitao
Copy link
Owner Author

Can you also implement it for MutableDictionaryArray ?

I tried, but it is not so easy. I will split it into another issue/PR since it requires some trait thinking.

@jorgecarleitao jorgecarleitao merged commit 5bd0c7a into main Oct 30, 2022
@jorgecarleitao jorgecarleitao deleted the extend_from_self branch October 30, 2022 22:57
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
feature A new feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Additional operations on MutableListArray
2 participants