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

Method SetUp

be/src/benchmarks/hash-table-benchmark.cc:114–132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

112 MemPool mem_pool_;
113 int initial_num_buckets;
114 void SetUp(int num_buckets) {
115 CreateTestEnv();
116 initial_num_buckets = num_buckets;
117 bool ht_success = CreateHashTable();
118 CHECK(ht_success) << "Creation of HashTable failed";
119 RowDescriptor rd;
120 ScalarExpr* build_expr = pool_.Add(new SlotRef(ColumnType(TYPE_INT), 1, false));
121 Status status = ((SlotRef*)build_expr)->Init(rd, true, nullptr);
122 CHECK(status.ok());
123 build_exprs_.push_back(build_expr);
124 ScalarExpr* probe_expr = pool_.Add(new SlotRef(ColumnType(TYPE_INT), 1, false));
125 status = ((SlotRef*)probe_expr)->Init(rd, true, nullptr);
126 CHECK(status.ok());
127 probe_exprs_.push_back(probe_expr);
128 status = HashTableCtx::Create(&pool_, runtime_state_, build_exprs_, probe_exprs_,
129 false /* !stores_nulls_ */, vector<bool>(build_exprs_.size(), false), 1, 0, 1,
130 &mem_pool_, &mem_pool_, &mem_pool_, &hash_context_);
131 CHECK(status.ok());
132 }
133 void TearDown() {
134 ScalarExpr::Close(build_exprs_);
135 ScalarExpr::Close(probe_exprs_);

Callers 1

mainFunction · 0.45

Calls 7

CreateClass · 0.85
push_backMethod · 0.80
ColumnTypeClass · 0.50
AddMethod · 0.45
InitMethod · 0.45
okMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected