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

Function NewScanner

sbuf/scanner.go:39–48  ·  view source on GitHub ↗

NewScanner returns a Scanner for r that filters records by filterExpr and s. If r implements fmt.Stringer, the scanner reports errors using a prefix of the string returned by its String method.

(ctx context.Context, r sio.Reader, filterExpr Pushdown)

Source from the content-addressed store, hash-verified

37// If r implements fmt.Stringer, the scanner reports errors using a prefix of the
38// string returned by its String method.
39func NewScanner(ctx context.Context, r sio.Reader, filterExpr Pushdown) (Scanner, error) {
40 s, err := newScanner(ctx, r, filterExpr)
41 if err != nil {
42 return nil, err
43 }
44 if stringer, ok := r.(fmt.Stringer); ok {
45 s = NamedScanner(s, stringer.String())
46 }
47 return s, nil
48}
49
50func newScanner(ctx context.Context, r sio.Reader, filterExpr Pushdown) (Scanner, error) {
51 var sa ScannerAble

Callers 6

compileLeafMethod · 0.92
OpenMethod · 0.92
OpenHTTPMethod · 0.92
NewDBMetaScannerFunction · 0.92
NewPoolMetaScannerFunction · 0.92
NewCommitMetaScannerFunction · 0.92

Calls 3

NamedScannerFunction · 0.85
newScannerFunction · 0.70
StringMethod · 0.65

Tested by

no test coverage detected