Pass nullMask to setValuesFromUncompressed #3247
Merged
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.
Fixes #3143 by making the compression code aware of null values which don't need to be able to be read later (0 is not necessarily compressible when doing in-place updates to compressed data).
I've made a few modifications to NullMask to clean up its initialization and to allow it to reference existing data in NullColumnChunks. I think eventually it will be useful to separate management of data buffers from the ColumnChunks, and at that point the NullColumnChunk could more or less just be a ColumnChunk that uses a NullMask to store its data, but that will take more work.
NullMask::resize
was also broken since memcpy takes the number of bytes to copy, not the number of (in this case) 64-bit values, so it was only copying the beginning of the data. I've added a unit test since we obviously aren't hitting that in the integration tests (it's only being used in one spot in the ValueVector's AuxiliaryBuffer).