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

Function orderPreservingCall

compiler/optimizer/op.go:121–134  ·  view source on GitHub ↗
(e dag.Expr, key field.Path)

Source from the content-addressed store, hash-verified

119}
120
121func orderPreservingCall(e dag.Expr, key field.Path) bool {
122 if call, ok := e.(*dag.CallExpr); ok {
123 switch call.Tag {
124 // There are probably other functions we could cover.
125 // It would be good if the function declaration included
126 // the info we need here. See issue #2660.
127 case "bucket", "ceil", "floor", "round":
128 if len(call.Args) >= 1 && fieldOf(call.Args[0]).Equal(key) {
129 return true
130 }
131 }
132 }
133 return false
134}
135
136func analyzeCuts(assignments []dag.Assignment, sortKeys order.SortKeys) order.SortKeys {
137 if sortKeys.IsNil() {

Callers 2

isKeyOfAggregateFunction · 0.85
propagateSortKeyOpMethod · 0.85

Calls 2

fieldOfFunction · 0.85
EqualMethod · 0.45

Tested by

no test coverage detected