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

Method EvalAndHashPrefetchGroup

be/src/exec/grouping-aggregator-ir.cc:63–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61
62template <bool AGGREGATED_ROWS>
63void IR_ALWAYS_INLINE GroupingAggregator::EvalAndHashPrefetchGroup(RowBatch* batch,
64 int start_row_idx, TPrefetchMode::type prefetch_mode, HashTableCtx* ht_ctx) {
65 HashTableCtx::ExprValuesCache* expr_vals_cache = ht_ctx->expr_values_cache();
66 const int cache_size = expr_vals_cache->capacity();
67
68 expr_vals_cache->Reset();
69 FOREACH_ROW_LIMIT(batch, start_row_idx, cache_size, batch_iter) {
70 TupleRow* row = batch_iter.Get();
71 bool is_null;
72 if (AGGREGATED_ROWS) {
73 is_null = !ht_ctx->EvalAndHashBuild(row);
74 } else {
75 is_null = !ht_ctx->EvalAndHashProbe(row);
76 }
77 // Hoist lookups out of non-null branch to speed up non-null case.
78 const uint32_t hash = expr_vals_cache->CurExprValuesHash();
79 const uint32_t partition_idx = hash >> (32 - NUM_PARTITIONING_BITS);
80 HashTable* hash_tbl = GetHashTable(partition_idx);
81 if (is_null) {
82 expr_vals_cache->SetRowNull();
83 } else if (prefetch_mode != TPrefetchMode::NONE) {
84 if (LIKELY(hash_tbl != nullptr)) hash_tbl->PrefetchBucket<false>(hash);
85 }
86 expr_vals_cache->NextRow();
87 }
88
89 expr_vals_cache->ResetForRead();
90}
91
92template <bool AGGREGATED_ROWS>
93Status GroupingAggregator::ProcessRow(

Callers

nothing calls this directly

Calls 4

expr_values_cacheMethod · 0.80
ResetForReadMethod · 0.80
capacityMethod · 0.45
ResetMethod · 0.45

Tested by

no test coverage detected