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

Method Call

runtime/vam/expr/function/parse.go:23–40  ·  view source on GitHub ↗
(args ...vector.Any)

Source from the content-addressed store, hash-verified

21}
22
23func (p *ParseURI) Call(args ...vector.Any) vector.Any {
24 if vec, ok := expr.CheckForNullThenError(args); ok {
25 return vec
26 }
27 vec := vector.Under(args[0])
28 if vec.Type().ID() != super.IDString {
29 return vector.NewWrappedError(p.sctx, "parse_uri: string arg required", args[0])
30 }
31 var b scode.Builder
32 db := vector.NewDynamicBuilder()
33 for i := range vec.Len() {
34 b.Truncate()
35 vec.Serialize(&b, i)
36 val := super.NewValue(super.TypeString, b.Bytes().Body())
37 db.Write(p.samfn.Call([]super.Value{val}))
38 }
39 return db.Build(p.sctx)
40}
41
42type ParseSUP struct {
43 sctx *super.Context

Callers

nothing calls this directly

Calls 15

TruncateMethod · 0.95
BytesMethod · 0.95
WriteMethod · 0.95
BuildMethod · 0.95
CheckForNullThenErrorFunction · 0.92
UnderFunction · 0.92
NewWrappedErrorFunction · 0.92
NewDynamicBuilderFunction · 0.92
NewValueFunction · 0.92
BodyMethod · 0.80
IDMethod · 0.65
TypeMethod · 0.65

Tested by

no test coverage detected