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

Method SetUp

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

Source from the content-addressed store, hash-verified

72 int next_query_id_ = 0;
73
74 virtual void SetUp() {
75 test_env_.reset(new TestEnv());
76 ASSERT_OK(test_env_->Init());
77 RowDescriptor desc;
78
79 // Not very easy to test complex tuple layouts so this test will use the
80 // simplest. The purpose of these tests is to exercise the hash map
81 // internals so a simple build/probe expr is fine.
82 ScalarExpr* build_expr =
83 pool_.Add(new SlotRef(ColumnType(TYPE_INT), 1, true /* nullable */));
84 ASSERT_OK(build_expr->Init(desc, true, nullptr));
85 build_exprs_.push_back(build_expr);
86 ASSERT_OK(ScalarExprEvaluator::Create(build_exprs_, nullptr, &pool_, &mem_pool_,
87 &mem_pool_, &build_expr_evals_));
88 ASSERT_OK(ScalarExprEvaluator::Open(build_expr_evals_, nullptr));
89
90 ScalarExpr* probe_expr =
91 pool_.Add(new SlotRef(ColumnType(TYPE_INT), 1, true /* nullable */));
92 ASSERT_OK(probe_expr->Init(desc, true, nullptr));
93 probe_exprs_.push_back(probe_expr);
94 ASSERT_OK(ScalarExprEvaluator::Create(probe_exprs_, nullptr, &pool_, &mem_pool_,
95 &mem_pool_, &probe_expr_evals_));
96 ASSERT_OK(ScalarExprEvaluator::Open(probe_expr_evals_, nullptr));
97
98 CreateTestEnv();
99 }
100
101 virtual void TearDown() {
102 ScalarExprEvaluator::Close(build_expr_evals_, nullptr);

Callers

nothing calls this directly

Calls 6

CreateClass · 0.85
push_backMethod · 0.80
ColumnTypeClass · 0.70
resetMethod · 0.65
InitMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected