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

Method codegenRowEqVectors

bolt/exec/RowContainer.cpp:1372–1402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1370 auto fnName = codeGenerator.GetCmpFuncName();
1371 auto moduleSP = codeGenerator.codegen();
1372 return {std::move(moduleSP), std::move(fnName)};
1373}
1374
1375std::tuple<bytedance::bolt::jit::CompiledModuleSP, std::string>
1376RowContainer::codegenRowEqVectors(
1377 const std::vector<TypePtr>& keyTypes,
1378 bool haveNulls) {
1379 // Setup the CodeGenerator
1380 bytedance::bolt::jit::RowEqVectorsCodeGenerator codeGenerator;
1381 {
1382 std::vector<TypePtr> keyTypeKinds;
1383 std::vector<int32_t> nullByteOffsets;
1384 std::vector<int8_t> nullByteMasks;
1385 std::vector<int32_t> keyOffsets;
1386
1387 for (auto i = 0; i < keyTypes.size(); ++i) {
1388 keyTypeKinds.emplace_back(keyTypes[i]);
1389 auto col = this->columnAt(i);
1390 keyOffsets.emplace_back(col.offset());
1391 nullByteOffsets.emplace_back(col.nullByte());
1392 nullByteMasks.emplace_back(col.nullMask());
1393 }
1394 codeGenerator.setKeyTypes(std::move(keyTypeKinds))
1395 .setKeyOffsets(std::move(keyOffsets))
1396 .setNullByteOffsets(std::move(nullByteOffsets))
1397 .setNullMasks(std::move(nullByteMasks))
1398 .setHasNullKeys(haveNulls);
1399 }
1400
1401 auto fnName = codeGenerator.GetCmpFuncName();
1402 auto moduleSP = codeGenerator.codegen();
1403
1404 return {std::move(moduleSP), std::move(fnName)};
1405}

Callers 4

HashTableMethod · 0.80
prepareMethod · 0.80
runOnceMethod · 0.80
prepareMethod · 0.80

Calls 7

columnAtMethod · 0.95
codegenMethod · 0.80
sizeMethod · 0.45
offsetMethod · 0.45
nullByteMethod · 0.45
nullMaskMethod · 0.45
GetCmpFuncNameMethod · 0.45

Tested by 2

runOnceMethod · 0.64
prepareMethod · 0.64