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

Method LookupTypeSet

context.go:206–219  ·  view source on GitHub ↗
(inner Type)

Source from the content-addressed store, hash-verified

204}
205
206func (c *Context) LookupTypeSet(inner Type) *TypeSet {
207 c.mu.Lock()
208 defer c.mu.Unlock()
209 if c.sets == nil {
210 c.sets = make(map[Type]*TypeSet)
211 }
212 if typ, ok := c.sets[inner]; ok {
213 return typ
214 }
215 typ := NewTypeSet(c.nextIDWithLock(), inner)
216 c.enterWithLock(typ)
217 c.sets[inner] = typ
218 return typ
219}
220
221func (c *Context) LookupTypeMap(keyType, valType Type) *TypeMap {
222 key := keyPool.Get().(*[]byte)

Callers 15

TestDuplicatesFunction · 0.95
DecodeTypeValueMethod · 0.95
exprMethod · 0.80
convertSetMethod · 0.80
convertTypeMethod · 0.80
projectMethod · 0.80
evalMethod · 0.80
EvalMethod · 0.80
evalMethod · 0.80
EvalMethod · 0.80
EvalMethod · 0.80
evalMethod · 0.80

Calls 3

nextIDWithLockMethod · 0.95
enterWithLockMethod · 0.95
NewTypeSetFunction · 0.85

Tested by 1

TestDuplicatesFunction · 0.76