Feather.jl icon indicating copy to clipboard operation
Feather.jl copied to clipboard

`Arrow.BitPrimitive` is indexed wrongly, should probably be casted to BitArray

Open davidavdav opened this issue 5 years ago • 0 comments

Hello,

I found that boolean columns index strangely when they are of type Arrow.BitPrimitive. A minimum working error:

y = DataFrame(ok=rand(Bool, 100))
@assert length(y.ok[trues(100)]) == 100 ## true
Feather.write("test.feather", y)
y = Feather.read("test.feather")
@assert length(y.ok[trues(100)]) == 100 ## false

a fix for me would be

y.ok = BitArray(y.ok)
@assert length(y.ok[trues(100)]) == 100 ## true

I don't know what the Arrow types are, but the BitPrimitive type should probably be converted to BitArray

davidavdav avatar Nov 29 '19 11:11 davidavdav