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

Function sortKeyOfExpr

compiler/optimizer/op.go:92–98  ·  view source on GitHub ↗
(e dag.Expr, o order.Which)

Source from the content-addressed store, hash-verified

90}
91
92func sortKeyOfExpr(e dag.Expr, o order.Which) (order.SortKey, bool) {
93 key := fieldOf(e)
94 if key == nil {
95 return order.SortKey{}, false
96 }
97 return order.NewSortKey(o, key), true
98}
99
100// isKeyOfAggregate returns true iff any of a's grouping keys is the
101// same as the given primary-key sort order or an order-preserving function

Callers 1

sortKeysOfSortExprsFunction · 0.85

Calls 2

NewSortKeyFunction · 0.92
fieldOfFunction · 0.85

Tested by

no test coverage detected