(args ...vector.Any)
| 69 | } |
| 70 | |
| 71 | func (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 | |
| 85 | func (c *Ceil) ceil(vec vector.Any) vector.Any { |
| 86 | switch vec := vec.(type) { |
nothing calls this directly
no test coverage detected