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

Method slow

runtime/vam/expr/function/datepart.go:34–48  ·  view source on GitHub ↗
(partArg, timeArg vector.Any)

Source from the content-addressed store, hash-verified

32}
33
34func (d *DatePart) slow(partArg, timeArg vector.Any) vector.Any {
35 fn := samfunc.NewDatePart(d.sctx)
36 var b scode.Builder
37 vb := vector.NewDynamicBuilder()
38 for i := range partArg.Len() {
39 b.Reset()
40 partArg.Serialize(&b, i)
41 partVal := super.NewValue(super.TypeString, b.Bytes().Body())
42 b.Reset()
43 timeArg.Serialize(&b, i)
44 timeVal := super.NewValue(super.TypeTime, b.Bytes().Body())
45 vb.Write(fn.Call([]super.Value{partVal, timeVal}))
46 }
47 return vb.Build(d.sctx)
48}

Callers 1

CallMethod · 0.95

Calls 10

ResetMethod · 0.95
BytesMethod · 0.95
WriteMethod · 0.95
CallMethod · 0.95
BuildMethod · 0.95
NewDynamicBuilderFunction · 0.92
NewValueFunction · 0.92
BodyMethod · 0.80
LenMethod · 0.65
SerializeMethod · 0.65

Tested by

no test coverage detected