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

Added .arced/.boxed to arrays #1040

Merged
merged 1 commit into from
Jun 2, 2022
Merged

Added .arced/.boxed to arrays #1040

merged 1 commit into from
Jun 2, 2022

Conversation

jorgecarleitao
Copy link
Owner

@jorgecarleitao jorgecarleitao commented Jun 2, 2022

This PR adds two helper functions to all arrays. They follow the same pattern as futures::Stream (https://docs.rs/futures/latest/futures/future/trait.FutureExt.html#method.boxed)

The main idea is that they can be used to simplify how code is written:

  • array.boxed() is an alias for Box::new(array) as Box<dyn Array>
  • array.arced() is an alias for Arc::new(array) as Arc<dyn Array>

@codecov
Copy link

codecov bot commented Jun 2, 2022

Codecov Report

Merging #1040 (cc33075) into main (4477126) will decrease coverage by 0.05%.
The diff coverage is 58.51%.

@@            Coverage Diff             @@
##             main    #1040      +/-   ##
==========================================
- Coverage   81.42%   81.37%   -0.06%     
==========================================
  Files         360      360              
  Lines       34320    34386      +66     
==========================================
+ Hits        27946    27980      +34     
- Misses       6374     6406      +32     
Impacted Files Coverage Δ
src/io/ipc/mod.rs 40.00% <ø> (ø)
src/io/ipc/write/file_async.rs 81.75% <ø> (ø)
src/io/ipc/write/stream_async.rs 84.94% <ø> (ø)
src/io/parquet/read/deserialize/null.rs 0.00% <0.00%> (ø)
src/io/parquet/write/sink.rs 75.96% <ø> (ø)
src/array/binary/mod.rs 88.82% <50.00%> (-1.29%) ⬇️
src/array/boolean/mod.rs 87.78% <50.00%> (-1.82%) ⬇️
src/array/dictionary/mod.rs 81.18% <50.00%> (-1.97%) ⬇️
src/array/fixed_size_binary/mod.rs 89.00% <50.00%> (-1.27%) ⬇️
src/array/fixed_size_list/mod.rs 64.28% <50.00%> (-0.58%) ⬇️
... and 15 more

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 4477126...cc33075. Read the comment docs.

@jorgecarleitao jorgecarleitao merged commit 06f8f36 into main Jun 2, 2022
@jorgecarleitao jorgecarleitao deleted the arced branch June 2, 2022 17:22
@jorgecarleitao jorgecarleitao added enhancement An improvement to an existing feature and removed feature A new feature labels Jun 2, 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.

None yet

1 participant