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

Function makeStructEncodingOption

bolt/dwio/dwrf/test/ReaderTest.cpp:1325–1341  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1323}
1324
1325std::unordered_map<uint32_t, std::vector<std::string>> makeStructEncodingOption(
1326 const ColumnSelector& cs,
1327 const std::string& columnName,
1328 const std::vector<int32_t>& keys) {
1329 const auto schema = cs.getSchemaWithId();
1330 const auto names = schema->type()->as<TypeKind::ROW>().names();
1331
1332 for (uint32_t i = 0; i < names.size(); ++i) {
1333 if (columnName == names[i]) {
1334 std::unordered_map<uint32_t, std::vector<std::string>> config;
1335 config[schema->childAt(i)->id()] = stringify(keys);
1336 return config;
1337 }
1338 }
1339
1340 folly::assume_unreachable();
1341}
1342
1343void verifyMapColumnEqual(
1344 MapVector* mapVector,

Callers 1

Calls 6

stringifyFunction · 0.85
childAtMethod · 0.80
namesMethod · 0.45
typeMethod · 0.45
sizeMethod · 0.45
idMethod · 0.45

Tested by

no test coverage detected