-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Clean up PrimitiveColumnContainer #6656
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
Clean up PrimitiveColumnContainer #6656
Conversation
Try to clean up PrimitiveColumnContainer
} | ||
_modifyNullCountWhileIndexing = true; | ||
count -= allocatable; | ||
|
||
} | ||
} | ||
|
||
public void ApplyElementwise(Func<T?, long, T?> func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, what is the contract for this method? It's going to swap out the buffer in the array with a new one -- what if someone's holding on to the old one? How do you handle reference invalidation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just inherited this but my understanding is the following:
- This method is going to apply
func
for each element and update the value in buffer- It will make the buffer mutable if it needs to
- It will update the
nullBitMapBuffer
If something is holding on to the old buffer - it shouldn't be/it's outdated.
Fix helper
Remove duplicate
More clean up
Fix slice
Update name to GetOrCreateMutable
Use null instead of default for nullable values.
Clean up Apply methods.
…cleanup' into u/jakerad/column-container-cleanup
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #6656 +/- ##
==========================================
- Coverage 68.59% 68.59% -0.01%
==========================================
Files 1200 1201 +1
Lines 250326 250296 -30
Branches 26096 26094 -2
==========================================
- Hits 171701 171679 -22
+ Misses 71809 71803 -6
+ Partials 6816 6814 -2
Flags with carried forward coverage won't be shown. Click here to find out more.
|
I was inspired by a community members PR (#6642) to try and clean up PrimitiveColumnContainer.
I'd say this is Part 1 of a few part series for improving DataFrame.
Not Fixed: