MCPcopy Create free account
hub / github.com/brimdata/super / NewComparator

Function NewComparator

runtime/sam/expr/sort.go:107–109  ·  view source on GitHub ↗

NewComparator returns a super.Value comparator for exprs. To compare values a and b, it iterates over the elements e of exprs, stopping when e(a)!=e(b).

(exprs ...SortExpr)

Source from the content-addressed store, hash-verified

105// NewComparator returns a super.Value comparator for exprs. To compare values
106// a and b, it iterates over the elements e of exprs, stopping when e(a)!=e(b).
107func NewComparator(exprs ...SortExpr) *Comparator {
108 return &Comparator{slices.Clone(exprs)}
109}
110
111// WithMissingAsNull returns the receiver after modifying it to treat missing
112// values as the null value in comparisons.

Callers 6

TestParallelOrderFunction · 0.92
NewComparatorFunction · 0.92
NewAggregatorFunction · 0.92
ImportComparatorFunction · 0.92
NewValueCompareFnFunction · 0.70
BenchmarkSortFunction · 0.70

Calls 1

CloneMethod · 0.65

Tested by 2

TestParallelOrderFunction · 0.74
BenchmarkSortFunction · 0.56