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

Function matchFilter

compiler/optimizer/optimizer.go:444–453  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

442// and returns the filter's expression (and the modified seq) so
443// we can lift the filter predicate into the scanner.
444func 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}".
456func inlineRecordExprSpreads(v any) {

Callers 1

optimizeSourcePathsMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected