(args ...vector.Any)
| 15 | } |
| 16 | |
| 17 | func (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 | |
| 33 | func (b *Bucket) call(args ...vector.Any) vector.Any { |
| 34 | if vec, ok := expr.CheckForNullThenError(args); ok { |
nothing calls this directly
no test coverage detected