MCPcopy Create free account
hub / github.com/bytedance/bolt / setDictionaryWrapping

Method setDictionaryWrapping

bolt/expression/PeeledEncoding.cpp:108–123  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106} // namespace
107
108void PeeledEncoding::setDictionaryWrapping(
109 DecodedVector& decoded,
110 const SelectivityVector& rows,
111 BaseVector& firstWrapper) {
112 wrapEncoding_ = VectorEncoding::Simple::DICTIONARY;
113 baseSize_ = decoded.base()->size();
114 if (isDictionaryOverFlat(firstWrapper)) {
115 // Reuse indices and nulls buffers.
116 wrap_ = firstWrapper.wrapInfo();
117 wrapNulls_ = firstWrapper.nulls();
118 return;
119 }
120 auto wrapping = decoded.dictionaryWrapping(firstWrapper, rows.end());
121 wrap_ = std::move(wrapping.indices);
122 wrapNulls_ = std::move(wrapping.nulls);
123}
124
125bool PeeledEncoding::peelInternal(
126 const std::vector<VectorPtr>& vectorsToPeel,

Callers

nothing calls this directly

Calls 7

isDictionaryOverFlatFunction · 0.85
sizeMethod · 0.45
baseMethod · 0.45
wrapInfoMethod · 0.45
nullsMethod · 0.45
dictionaryWrappingMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected