Fix Arrow deserialization for FlatArray
#29
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.
Tests currently fail with the latest compatible versions of this package's dependencies because deserializing a
FlatArray
from Arrow ends up calling aFlatArray
constructor method that doesn't exist:FlatArray(vec, size)
. What it should actually call is the inner constructor,FlatArray{T}(vec, size)
. To fix this, we can define a method forfromarrow
from ArrowTypes to simply call the inner constructor. An analogous change is not needed forWeights
because the method thatfromarrow
calls by default does exist in that case.Note that no new tests were added. This is because the current tests actually cover this case.
Originally encountered by then pair debugged with @patinoam.