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

Method Call

runtime/vam/expr/function/string.go:217–231  ·  view source on GitHub ↗
(args ...vector.Any)

Source from the content-addressed store, hash-verified

215}
216
217func (t *ToUpper) Call(args ...vector.Any) vector.Any {
218 if vec, ok := expr.CheckForNullThenError(args); ok {
219 return vec
220 }
221 v := vector.Under(args[0])
222 if v.Type() != super.TypeString {
223 return vector.NewWrappedError(t.sctx, "upper: string arg required", v)
224 }
225 out := vector.NewStringEmpty(v.Len())
226 for i := uint32(0); i < v.Len(); i++ {
227 s := vector.StringValue(v, i)
228 out.Append(strings.ToUpper(s))
229 }
230 return out
231}
232
233type Trim struct {
234 sctx *super.Context

Callers

nothing calls this directly

Calls 8

CheckForNullThenErrorFunction · 0.92
UnderFunction · 0.92
NewWrappedErrorFunction · 0.92
NewStringEmptyFunction · 0.92
StringValueFunction · 0.92
TypeMethod · 0.65
LenMethod · 0.65
AppendMethod · 0.45

Tested by

no test coverage detected