MCPcopy Create free account
hub / github.com/apache/impala / VerifyFiltersProduced

Function VerifyFiltersProduced

be/src/runtime/query-state.cc:363–380  ·  view source on GitHub ↗

Verifies the filters produced by all instances on the same backend are the same.

Source from the content-addressed store, hash-verified

361
362// Verifies the filters produced by all instances on the same backend are the same.
363bool VerifyFiltersProduced(const vector<TPlanFragmentInstanceCtx>& instance_ctxs) {
364 int fragment_idx = -1;
365 std::unordered_set<int> first_set;
366 for (const TPlanFragmentInstanceCtx& instance_ctx : instance_ctxs) {
367 bool first_instance_of_fragment =
368 fragment_idx == -1 || fragment_idx != instance_ctx.fragment_idx;
369 if (first_instance_of_fragment) {
370 fragment_idx = instance_ctx.fragment_idx;
371 first_set.clear();
372 for (auto f : instance_ctx.filters_produced) first_set.insert(f.filter_id);
373 }
374 if (first_set.size() != instance_ctx.filters_produced.size()) return false;
375 for (auto f : instance_ctx.filters_produced) {
376 if (first_set.find(f.filter_id) == first_set.end()) return false;
377 }
378 }
379 return true;
380}
381
382Status QueryState::InitFilterBank() {
383 const NetworkAddressPB& this_krpc_address = ExecEnv::GetInstance()->krpc_address();

Callers 1

InitFilterBankMethod · 0.85

Calls 5

clearMethod · 0.65
insertMethod · 0.45
sizeMethod · 0.45
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected