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

Function refineBooleanMixNonNull

bolt/expression/BooleanMix.cpp:37–48  ·  view source on GitHub ↗

Checks if bits in specified positions are all set, all unset or mixed.

Source from the content-addressed store, hash-verified

35
36/// Checks if bits in specified positions are all set, all unset or mixed.
37BooleanMix refineBooleanMixNonNull(
38 const uint64_t* bits,
39 const SelectivityVector& rows) {
40 int32_t first = bits::findFirstBit(bits, rows.begin(), rows.end());
41 if (first < 0) {
42 return BooleanMix::kAllFalse;
43 }
44 if (first == rows.begin() && bits::isAllSet(bits, rows.begin(), rows.end())) {
45 return BooleanMix::kAllTrue;
46 }
47 return BooleanMix::kMixNonNull;
48}
49} // namespace
50
51// Return a BooleanMix representing the status of boolean values in vector. If

Callers 1

getFlatBoolFunction · 0.85

Calls 4

findFirstBitFunction · 0.85
isAllSetFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected