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

Method eval

bolt/dwio/common/MetadataFilter.cpp:241–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241void MetadataFilter::eval(
242 std::vector<std::pair<const LeafNode*, std::vector<uint64_t>>>&
243 leafNodeResults,
244 std::vector<uint64_t>& finalResult) {
245 if (!root_) {
246 return;
247 }
248 LeafResults leafResults;
249 for (auto& [leaf, result] : leafNodeResults) {
250 BOLT_CHECK_EQ(
251 result.size(),
252 finalResult.size(),
253 "Result size mismatch: {}",
254 leaf->field().toString());
255 BOLT_CHECK(
256 leafResults.emplace(leaf, &result).second,
257 "Duplicate results: {}",
258 leaf->field().toString());
259 }
260 const auto bitCount = finalResult.size() * 64;
261 if (auto* combined = root_->eval(leafResults, bitCount)) {
262 bits::orBits(finalResult.data(), combined, 0, bitCount);
263 }
264}
265
266std::string MetadataFilter::toString() const {
267 return !root_ ? "" : root_->toString();

Callers 4

checkSkipStridesMethod · 0.45
filterRowGroupsMethod · 0.45
evalMethod · 0.45
evalMethod · 0.45

Calls 6

orBitsFunction · 0.85
sizeMethod · 0.45
toStringMethod · 0.45
fieldMethod · 0.45
emplaceMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected