Skip to content

Commit

Permalink
Update pqarrow/arrowutils/sort.go
Browse files Browse the repository at this point in the history
Co-authored-by: Geofrey Ernest <[email protected]>
  • Loading branch information
metalmatze and gernest authored Dec 15, 2023
1 parent 1c6f0f7 commit 50fbae2
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pqarrow/arrowutils/sort.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,12 @@ func (s orderedSorter[T]) Len() int {
}

func (s orderedSorter[T]) Less(i, j int) bool {
if s.array.IsNull(int(s.indices[i])) && !s.array.IsNull(int(s.indices[j])) {
if s.array.IsNull(int(s.indices[i])) {
return false
}
if !s.array.IsNull(int(s.indices[i])) && s.array.IsNull(int(s.indices[j])) {
if s.array.IsNull(int(s.indices[j])) {
return true
}
if s.array.IsNull(int(s.indices[i])) && s.array.IsNull(int(s.indices[j])) {
return false
}
return s.array.Value(int(s.indices[i])) < s.array.Value(int(s.indices[j]))
}

Expand Down

0 comments on commit 50fbae2

Please sign in to comment.