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

Method Call

runtime/vam/expr/function/math.go:71–83  ·  view source on GitHub ↗
(args ...vector.Any)

Source from the content-addressed store, hash-verified

69}
70
71func (c *Ceil) Call(args ...vector.Any) vector.Any {
72 if vec, ok := expr.CheckForNullThenError(args); ok {
73 return vec
74 }
75 vec := vector.Under(args[0])
76 switch id := vec.Type().ID(); {
77 case super.IsFloat(id):
78 return c.ceil(vec)
79 case super.IsNumber(id):
80 return vec
81 }
82 return vector.NewWrappedError(c.sctx, "ceil: not a number", vec)
83}
84
85func (c *Ceil) ceil(vec vector.Any) vector.Any {
86 switch vec := vec.(type) {

Callers

nothing calls this directly

Calls 8

ceilMethod · 0.95
CheckForNullThenErrorFunction · 0.92
UnderFunction · 0.92
IsFloatFunction · 0.92
IsNumberFunction · 0.92
NewWrappedErrorFunction · 0.92
IDMethod · 0.65
TypeMethod · 0.65

Tested by

no test coverage detected