Skip to content

Commit

Permalink
parquet: Fix issue with incorrect null length (#5525)
Browse files Browse the repository at this point in the history
Closes #5515
  • Loading branch information
mattnibs authored Dec 11, 2024
1 parent f1d0f74 commit 6e7d041
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions zio/parquetio/vectorreader.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,15 @@ func makeNulls(a arrow.Array) *vector.Bool {
if len(bytes) == 0 {
return nil
}
bits := make([]uint64, (len(bytes)+7)/8)
n := a.Len()
bits := make([]uint64, (n+63)/64)
bitsAsBytes := reinterpretSlice[byte](bits)
copy(bitsAsBytes, bytes)
for i := range bits {
// Flip bits
bits[i] ^= ^uint64(0)
}
return vector.NewBool(bits, uint32(a.Len()), nil)
return vector.NewBool(bits, uint32(n), nil)
}

func convertSlice[Out, In uint8 | uint16 | uint32 | uint64 | int8 | int16 | int32 | int64 | float32 | float64](in []In) []Out {
Expand Down

0 comments on commit 6e7d041

Please sign in to comment.