Skip to content

Commit

Permalink
handle zero length slice but proper physical offset
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroshade committed Oct 21, 2022
1 parent b988833 commit 3e9f906
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions go/arrow/rle/rle_utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ import (
)

func FindPhysicalOffset(arr arrow.ArrayData) int {
if arr.Len() == 0 {
return 0
}

data := arr.Children()[0]
logicalOffset := arr.Offset()

if data.Len() == 0 {
return 0
}

switch data.DataType().ID() {
case arrow.INT16:
runEnds := arrow.Int16Traits.CastFromBytes(data.Buffers()[1].Bytes())
Expand Down

0 comments on commit 3e9f906

Please sign in to comment.