MCPcopy Create free account
hub / github.com/cockroachdb/cockroachdb-parser / GetValueAt

Function GetValueAt

pkg/col/coldata/vec_tmpl.go:391–409  ·  view source on GitHub ↗

GetValueAt is an inefficient helper to get the value in a Vec when the type is unknown.

(v *Vec, rowIdx int)

Source from the content-addressed store, hash-verified

389// GetValueAt is an inefficient helper to get the value in a Vec when the type
390// is unknown.
391func GetValueAt(v *Vec, rowIdx int) interface{} {
392 if v.Nulls().NullAt(rowIdx) {
393 return nil
394 }
395 t := v.Type()
396 switch v.CanonicalTypeFamily() {
397 // {{range .}}
398 case _CANONICAL_TYPE_FAMILY:
399 switch t.Width() {
400 // {{range .WidthOverloads}}
401 case _TYPE_WIDTH:
402 target := v.TemplateType()
403 return target.Get(rowIdx)
404 // {{end}}
405 }
406 // {{end}}
407 }
408 panic(fmt.Sprintf("unhandled type %s", t))
409}

Callers

nothing calls this directly

Calls 7

NullAtMethod · 0.80
NullsMethod · 0.80
CanonicalTypeFamilyMethod · 0.80
TemplateTypeMethod · 0.80
TypeMethod · 0.65
WidthMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…