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

Function newBufferFilterForLiteral

compiler/rungen/bufferfilter.go:109–119  ·  view source on GitHub ↗
(val super.Value)

Source from the content-addressed store, hash-verified

107}
108
109func newBufferFilterForLiteral(val super.Value) (*expr.BufferFilter, error) {
110 if id := val.Type().ID(); super.IsNumber(id) || id == super.IDNull {
111 // All numbers are comparable, so they can require up to three
112 // patterns: float, varint, and uvarint.
113 return nil, nil
114 }
115 // We're looking for a complete BSUP value, so we can lengthen the
116 // pattern by calling Encode to add a tag.
117 pattern := string(val.Encode(nil))
118 return expr.NewBufferFilterForString(pattern), nil
119}

Callers 1

CompileBufferFilterFunction · 0.85

Calls 5

IsNumberFunction · 0.92
NewBufferFilterForStringFunction · 0.92
IDMethod · 0.65
TypeMethod · 0.65
EncodeMethod · 0.65

Tested by

no test coverage detected