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

Correctly update child-offsets in GrowableUnion #1360

Merged
merged 6 commits into from
Jan 16, 2023

Conversation

jleibs
Copy link
Contributor

@jleibs jleibs commented Jan 15, 2023

This resolves: #1359

As mentioned in the ticket, union offsets weren't being correctly updated to reflect positions in the new child fields. This adds a new method to the Growable interface: len(). I believe I've got the right interpretation for the different growable implementations but would very much appreciate a sanity check there.

@jleibs jleibs changed the title Correctly update offsets when growing union Correctly update child-offsets in GrowableUnion Jan 15, 2023
@codecov
Copy link

codecov bot commented Jan 15, 2023

Codecov Report

Base: 83.28% // Head: 83.37% // Increases project coverage by +0.08% 🎉

Coverage data is based on head (2fd43b8) compared to base (211be21).
Patch coverage: 97.56% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1360      +/-   ##
==========================================
+ Coverage   83.28%   83.37%   +0.08%     
==========================================
  Files         371      371              
  Lines       40239    40277      +38     
==========================================
+ Hits        33515    33582      +67     
+ Misses       6724     6695      -29     
Impacted Files Coverage Δ
src/array/growable/mod.rs 83.09% <ø> (+8.45%) ⬆️
src/array/growable/structure.rs 95.34% <75.00%> (-1.00%) ⬇️
src/array/growable/binary.rs 95.38% <100.00%> (+0.22%) ⬆️
src/array/growable/boolean.rs 86.53% <100.00%> (+0.82%) ⬆️
src/array/growable/dictionary.rs 88.67% <100.00%> (+0.32%) ⬆️
src/array/growable/fixed_binary.rs 100.00% <100.00%> (ø)
src/array/growable/fixed_size_list.rs 87.87% <100.00%> (+14.86%) ⬆️
src/array/growable/list.rs 96.05% <100.00%> (+0.16%) ⬆️
src/array/growable/null.rs 66.66% <100.00%> (+4.16%) ⬆️
src/array/growable/primitive.rs 94.91% <100.00%> (+0.27%) ⬆️
... and 13 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.

Copy link
Owner

@jorgecarleitao jorgecarleitao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went through this and makes a lot of sense. Thanks a lot for the PR (and for the well framed issue!)

I left a minor suggestion, but really good regardless!

src/array/growable/mod.rs Outdated Show resolved Hide resolved
@jorgecarleitao jorgecarleitao merged commit a7df70b into jorgecarleitao:main Jan 16, 2023
ritchie46 pushed a commit to ritchie46/arrow2 that referenced this pull request Mar 29, 2023
ritchie46 pushed a commit to ritchie46/arrow2 that referenced this pull request Apr 5, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

growable::union is broken for dense unions
2 participants