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

Function newShadow

runtime/vcache/shadow.go:46–83  ·  view source on GitHub ↗

newShadow decodes the CSUP metadata structure to the appropriate shadow object. No vector data data is actually loaded here.

(cctx *csup.Context, id csup.ID)

Source from the content-addressed store, hash-verified

44// newShadow decodes the CSUP metadata structure to the appropriate shadow object.
45// No vector data data is actually loaded here.
46func newShadow(cctx *csup.Context, id csup.ID) shadow {
47 switch meta := cctx.Lookup(id).(type) {
48 case *csup.Dynamic:
49 return newDynamic(meta)
50 case *csup.Error:
51 return newError(cctx, meta)
52 case *csup.Named:
53 return newNamed(meta, newShadow(cctx, meta.Values))
54 case *csup.Record:
55 return newRecord(cctx, meta)
56 case *csup.Array:
57 return newArray(cctx, meta)
58 case *csup.Set:
59 return newSet(cctx, meta)
60 case *csup.Map:
61 return newMap(cctx, meta)
62 case *csup.Union:
63 return newUnion(cctx, meta)
64 case *csup.Fusion:
65 return newFusion(cctx, meta)
66 case *csup.Dict:
67 return newDict(cctx, meta)
68 case *csup.Int:
69 return newInt(cctx, meta)
70 case *csup.Uint:
71 return newUint(cctx, meta)
72 case *csup.Float:
73 return newFloat(cctx, meta)
74 case *csup.Bytes:
75 return newBytes(cctx, meta)
76 case *csup.Primitive:
77 return newPrimitive(cctx, meta)
78 case *csup.Const:
79 return newConst(cctx, meta)
80 default:
81 panic(fmt.Sprintf("vector cache: type %T not supported", meta))
82 }
83}

Callers 11

unmarshalMethod · 0.85
unmarshalMethod · 0.85
unmarshalMethod · 0.85
unmarshalMethod · 0.85
unmarshalMethod · 0.85
unmarshalMethod · 0.85
FetchMethod · 0.85
FetchUnorderedMethod · 0.85
unmarshalMethod · 0.85
unmarshalMethod · 0.85
unmarshalMethod · 0.85

Calls 15

newDynamicFunction · 0.85
newErrorFunction · 0.85
newNamedFunction · 0.85
newRecordFunction · 0.85
newSetFunction · 0.85
newMapFunction · 0.85
newDictFunction · 0.85
newIntFunction · 0.85
newUintFunction · 0.85
newFloatFunction · 0.85
newBytesFunction · 0.85
newConstFunction · 0.85

Tested by

no test coverage detected