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

Method FullScan

be/src/exec/hash-table-test.cc:166–181  ·  view source on GitHub ↗

Do a full table scan on table. All values should be between [min,max). If all_unique, then each key(int value) should only appear once. Results are stored in results, indexed by the key. Results must have been preallocated to be at least max size.

Source from the content-addressed store, hash-verified

164 // stored in results, indexed by the key. Results must have been preallocated to
165 // be at least max size.
166 void FullScan(HashTable* table, HashTableCtx* ht_ctx, int min, int max,
167 bool all_unique, TupleRow** results, TupleRow** expected) {
168 HashTable::Iterator iter = table->Begin(ht_ctx);
169 while (!iter.AtEnd()) {
170 TupleRow* row = iter.GetRow();
171 int32_t val = *reinterpret_cast<int32_t*>(build_expr_evals_[0]->GetValue(row));
172 EXPECT_GE(val, min);
173 EXPECT_LT(val, max);
174 if (all_unique) {
175 EXPECT_TRUE(results[val] == nullptr);
176 }
177 EXPECT_EQ(row->GetTuple(0), expected[val]->GetTuple(0));
178 results[val] = row;
179 iter.Next();
180 }
181 }
182
183 // Validate that probe_row evaluates overs probe_exprs is equal to build_row
184 // evaluated over build_exprs

Callers

nothing calls this directly

Calls 6

BeginMethod · 0.45
AtEndMethod · 0.45
GetRowMethod · 0.45
GetValueMethod · 0.45
GetTupleMethod · 0.45
NextMethod · 0.45

Tested by

no test coverage detected