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

Function sortKeysOfSortExprs

compiler/optimizer/op.go:80–90  ·  view source on GitHub ↗
(exprs []dag.SortExpr)

Source from the content-addressed store, hash-verified

78}
79
80func sortKeysOfSortExprs(exprs []dag.SortExpr) order.SortKeys {
81 // XXX Only single sort keys. See issue #2657.
82 if len(exprs) != 1 {
83 return nil
84 }
85 key, ok := sortKeyOfExpr(exprs[0].Key, exprs[0].Order)
86 if !ok {
87 return nil
88 }
89 return order.SortKeys{key}
90}
91
92func sortKeyOfExpr(e dag.Expr, o order.Which) (order.SortKey, bool) {
93 key := fieldOf(e)

Callers 1

analyzeSortKeysMethod · 0.85

Calls 1

sortKeyOfExprFunction · 0.85

Tested by

no test coverage detected