Skip to content

Commit

Permalink
pqarrow/arrowutils: Retain record if unmodified
Browse files Browse the repository at this point in the history
  • Loading branch information
metalmatze committed Nov 25, 2024
1 parent 6e043a8 commit cc92765
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pqarrow/arrowutils/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,9 @@ func TakeStructColumn(ctx context.Context, a *array.Struct, idx int, arr []arrow

// Immediately, return this struct if it has no fields/columns
if a.NumField() == 0 {
// If the original record is released and this is released once more,
// as usually done, we want to retain it once more.
a.Retain()
arr[idx] = a
return nil
}
Expand Down

0 comments on commit cc92765

Please sign in to comment.