(e dag.Expr, key field.Path)
| 119 | } |
| 120 | |
| 121 | func 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 | |
| 136 | func analyzeCuts(assignments []dag.Assignment, sortKeys order.SortKeys) order.SortKeys { |
| 137 | if sortKeys.IsNil() { |
no test coverage detected