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

Method LookupType

sio/bsupio/types.go:444–455  ·  view source on GitHub ↗
(id int)

Source from the content-addressed store, hash-verified

442}
443
444func (d *Decoder) LookupType(id int) (super.Type, error) {
445 if id < super.IDTypeComplex {
446 return super.LookupPrimitiveByID(id)
447 }
448 d.mu.RLock()
449 defer d.mu.RUnlock()
450 off := id - super.IDTypeComplex
451 if off < len(d.types) {
452 return d.types[off], nil
453 }
454 return nil, fmt.Errorf("no type found for type id %d", id)
455}
456
457func (d *Decoder) enter(typ super.Type) {
458 // Even though type decoding is single threaded, workers processing a

Callers 1

readTypeMethod · 0.95

Calls 1

LookupPrimitiveByIDFunction · 0.92

Tested by

no test coverage detected