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

Removed clone requirement in StructArray -> RecordBatch #307

Merged
merged 1 commit into from
Aug 22, 2021

Conversation

jorgecarleitao
Copy link
Owner

@jorgecarleitao jorgecarleitao commented Aug 21, 2021

For a large schema, the clone was expensive.

Backward incompatible changes:

  • From<&StructArray> for RecordBatch was replaced by From<StructArray> for RecordBatch, that consumes the array (and its schema). Use .clone() if you would like to not move the array (and incur the cost of cloning).
  • The implementation above now panics if the StructArray has a validity, since performing this conversion would have resulted in data loss (the validity).

@jorgecarleitao jorgecarleitao added enhancement An improvement to an existing feature backwards-incompatible labels Aug 21, 2021
@codecov
Copy link

codecov bot commented Aug 21, 2021

Codecov Report

Merging #307 (ced382a) into main (bbe607c) will increase coverage by 0.22%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #307      +/-   ##
==========================================
+ Coverage   80.52%   80.74%   +0.22%     
==========================================
  Files         323      324       +1     
  Lines       21135    21555     +420     
==========================================
+ Hits        17019    17405     +386     
- Misses       4116     4150      +34     
Impacted Files Coverage Δ
src/array/struct_.rs 42.85% <0.00%> (-6.33%) ⬇️
src/record_batch.rs 44.44% <0.00%> (ø)
src/compute/comparison/primitive.rs 95.12% <0.00%> (-0.20%) ⬇️
tests/it/io/json/mod.rs 100.00% <0.00%> (ø)
tests/it/array/fixed_size_binary/mutable.rs 100.00% <0.00%> (ø)
src/compute/comparison/simd/mod.rs 95.83% <0.00%> (ø)
src/array/primitive/mutable.rs 88.44% <0.00%> (+1.34%) ⬆️
src/io/json/read/reader.rs 75.67% <0.00%> (+1.35%) ⬆️
src/compute/comparison/mod.rs 95.62% <0.00%> (+2.00%) ⬆️
src/array/fixed_size_binary/mod.rs 50.84% <0.00%> (+3.57%) ⬆️
... and 4 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 bbe607c...ced382a. Read the comment docs.

@jorgecarleitao jorgecarleitao merged commit 0573369 into main Aug 22, 2021
@jorgecarleitao jorgecarleitao deleted the into_record branch August 22, 2021 19:42
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backwards-incompatible enhancement An improvement to an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant