matchFilter attempts to find a filter from the front seq and returns the filter's expression (and the modified seq) so we can lift the filter predicate into the scanner.
(seq dag.Seq)
| 442 | // and returns the filter's expression (and the modified seq) so |
| 443 | // we can lift the filter predicate into the scanner. |
| 444 | func matchFilter(seq dag.Seq) (dag.Expr, dag.Seq) { |
| 445 | if len(seq) == 0 { |
| 446 | return nil, seq |
| 447 | } |
| 448 | filter, ok := seq[0].(*dag.FilterOp) |
| 449 | if !ok { |
| 450 | return nil, seq |
| 451 | } |
| 452 | return filter.Expr, seq[1:] |
| 453 | } |
| 454 | |
| 455 | // inlineRecordExprSpreads transforms "{...{a}}" to "{a}". |
| 456 | func inlineRecordExprSpreads(v any) { |