amoeba commented on code in PR #1430:
URL: https://github.com/apache/arrow-go/pull/1430#discussion_r4405321485


##########
arrow/compute/internal/kernels/vector_sort.go:
##########
@@ -53,11 +53,19 @@ func (SortOptions) TypeName() string { return "SortOptions" 
}
 
 type SortState = SortOptions
 
-// SortKey defines a column to sort by with its ordering and null placement 
options.
+// SortKey defines a column to sort by with its ordering, null placement and 
float ordering options.
 type SortKey struct {
        ColumnIndex   int
        Order         SortOrder
        NullPlacement NullPlacement
+       // FloatTotalOrder orders float16/float32/float64 columns by the IEEE 
754 totalOrder
+       // predicate: -NaN < -Inf < negative values < -0 < +0 < positive values 
< +Inf < +NaN.
+       // NaNs are ordered as values (not null-like) and Descending reverses 
the whole order,
+       // NaNs included; nulls still follow NullPlacement. When false (the 
default), floats
+       // compare numerically with -0 == +0 and every NaN, regardless of sign, 
is grouped next
+       // to the nulls according to NullPlacement, independent of Order (Arrow 
C++ behavior).
+       // Non-float columns ignore it.
+       FloatTotalOrder bool

Review Comment:
   Nice.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to