Clean up PrimitiveColumnContainer#6656
Merged
michaelgsharp merged 10 commits intodotnet:mainfrom May 8, 2023
Merged
Conversation
Try to clean up PrimitiveColumnContainer
JakeRadMSFT
commented
May 5, 2023
JakeRadMSFT
commented
May 5, 2023
agocke
reviewed
May 5, 2023
| } | ||
| } | ||
|
|
||
| public void ApplyElementwise(Func<T?, long, T?> func) |
Member
There was a problem hiding this comment.
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?
Member
Author
There was a problem hiding this comment.
I just inherited this but my understanding is the following:
- This method is going to apply
funcfor 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.
jaredpar
reviewed
May 5, 2023
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.
|
michaelgsharp
approved these changes
May 8, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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: