Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CHORE] Implement growables for array types #1287

Merged
merged 14 commits into from
Aug 24, 2023
Merged

[CHORE] Implement growables for array types #1287

merged 14 commits into from
Aug 24, 2023

Conversation

jaychia
Copy link
Contributor

@jaychia jaychia commented Aug 22, 2023

Growables are generally useful for abstracting "physical" operations such as:

  1. Take
  2. Broadcast
  3. Filter

This will become much more important as we add new Array types (FixedSizeListArray, StructArray etc). These arrays can just implement their own Growable classes, and implementations for the physical kernels will be easy to implement.

Changes

  1. Adds a new Growable<Arr> trait that is a growable to build the specified Arr
  2. Adds a new GrowableArray trait which is implemented by DataArray and LogicalArray: these types can now create a growable using their associated ::make_growable functions
  3. Refactors if_else to use the new growables, reducing quite a bit of code and nasty macro usage

@jaychia jaychia force-pushed the jay/growable-main branch from d748cb6 to 07a5d48 Compare August 22, 2023 20:06
@codecov
Copy link

codecov bot commented Aug 22, 2023

Codecov Report

Merging #1287 (686f103) into main (671e340) will increase coverage by 0.03%.
Report is 1 commits behind head on main.
The diff coverage is n/a.

❗ Current head 686f103 differs from pull request most recent head de632e8. Consider uploading reports for the commit de632e8 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1287      +/-   ##
==========================================
+ Coverage   87.32%   87.35%   +0.03%     
==========================================
  Files          61       61              
  Lines        6049     6049              
==========================================
+ Hits         5282     5284       +2     
+ Misses        767      765       -2     

see 3 files with indirect coverage changes

@jaychia jaychia changed the title Implement growables for array types [CHORE] Implement growables for array types Aug 22, 2023
@github-actions github-actions bot added the chore label Aug 22, 2023
@jaychia jaychia force-pushed the jay/growable-main branch from c1e4fae to 0d0b7e0 Compare August 23, 2023 07:16
@jaychia jaychia requested a review from samster25 August 23, 2023 17:46
@jaychia jaychia force-pushed the jay/growable-main branch from 653c84e to 0196669 Compare August 23, 2023 20:08
@jaychia jaychia merged commit e0b988c into main Aug 24, 2023
@jaychia jaychia deleted the jay/growable-main branch August 24, 2023 18:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants