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

Method printEncodings

bolt/vector/tests/VectorTest.cpp:356–377  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354 }
355
356 static std::string printEncodings(const VectorPtr& vector) {
357 std::stringstream out;
358 out << vector->encoding();
359
360 VectorPtr inner = vector;
361 do {
362 switch (inner->encoding()) {
363 case VectorEncoding::Simple::DICTIONARY:
364 case VectorEncoding::Simple::CONSTANT:
365 inner = inner->valueVector();
366 if (inner == nullptr) {
367 return out.str();
368 }
369 break;
370 default:
371 return out.str();
372 }
373
374 out << ", " << inner->encoding();
375 } while (true);
376 BOLT_UNREACHABLE();
377 }
378
379 void testCopyEncoded(VectorPtr source) {
380 bool maybeConstant = false;

Callers

nothing calls this directly

Calls 2

strMethod · 0.80
encodingMethod · 0.45

Tested by

no test coverage detected