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

Method Call

runtime/vam/expr/function/time.go:17–31  ·  view source on GitHub ↗
(args ...vector.Any)

Source from the content-addressed store, hash-verified

15}
16
17func (b *Bucket) Call(args ...vector.Any) vector.Any {
18 if vec, ok := expr.CheckForNullThenError(args); ok {
19 return vec
20 }
21 args = underAll(args)
22 tsArg, binArg := args[0], args[1]
23 tsID, binID := tsArg.Type().ID(), binArg.Type().ID()
24 if tsID != super.IDDuration && tsID != super.IDTime {
25 return vector.NewWrappedError(b.sctx, b.name+": first argument is not a time or duration", tsArg)
26 }
27 if binID != super.IDDuration {
28 return vector.NewWrappedError(b.sctx, b.name+": second argument is not a duration", binArg)
29 }
30 return vector.Apply(false, b.call, tsArg, binArg)
31}
32
33func (b *Bucket) call(args ...vector.Any) vector.Any {
34 if vec, ok := expr.CheckForNullThenError(args); ok {

Callers

nothing calls this directly

Calls 6

CheckForNullThenErrorFunction · 0.92
NewWrappedErrorFunction · 0.92
ApplyFunction · 0.92
underAllFunction · 0.70
IDMethod · 0.65
TypeMethod · 0.65

Tested by

no test coverage detected