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

Method extractProbedFlags

bolt/exec/RowContainer.cpp:1088–1121  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1086 setBit(rows[i], probedFlagOffset_);
1087 }
1088 }
1089}
1090
1091void RowContainer::extractProbedFlags(
1092 const char* FOLLY_NONNULL const* FOLLY_NONNULL rows,
1093 int32_t numRows,
1094 bool setNullForNullKeysRow,
1095 bool setNullForNonProbedRow,
1096 const VectorPtr& result) {
1097 result->resize(numRows);
1098 result->clearAllNulls();
1099 auto flatResult = result->as<FlatVector<bool>>();
1100 auto* rawValues = flatResult->mutableRawValues<uint64_t>();
1101 for (auto i = 0; i < numRows; ++i) {
1102 // Check if this row has null keys.
1103 bool nullResult = false;
1104 if (setNullForNullKeysRow && nullableKeys_) {
1105 for (auto c = 0; c < keyTypes_.size(); ++c) {
1106 if (isNullAt(rows[i], columnAt(c))) {
1107 nullResult = true;
1108 break;
1109 }
1110 }
1111 }
1112
1113 if (nullResult) {
1114 flatResult->setNull(i, true);
1115 } else {
1116 bool probed = bits::isBitSet(rows[i], probedFlagOffset_);
1117 if (setNullForNonProbedRow && !probed) {
1118 flatResult->setNull(i, true);
1119 } else {
1120 bits::setBit(rawValues, i, probed);
1121 }
1122 }
1123 }
1124}

Callers 2

getBuildSideOutputMethod · 0.80
TEST_FFunction · 0.80

Calls 6

isBitSetFunction · 0.85
setBitFunction · 0.70
isNullAtFunction · 0.50
resizeMethod · 0.45
sizeMethod · 0.45
setNullMethod · 0.45

Tested by 1

TEST_FFunction · 0.64