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

Method TestSingleLiteralConstruction

be/src/exprs/expr-test.cc:1504–1522  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1502
1503template <typename T>
1504void ExprTest::TestSingleLiteralConstruction(
1505 const ColumnType& type, const T& value, const string& string_val) {
1506 ObjectPool pool;
1507
1508 RuntimeState state(TQueryCtx(), ExecEnv::GetInstance());
1509 MemTracker tracker;
1510 MemPool mem_pool(&tracker);
1511
1512 Literal* expr = CreateLiteral(type, string_val);
1513 ScalarExprEvaluator* eval;
1514 EXPECT_OK(
1515 ScalarExprEvaluator::Create(*expr, &state, &pool, &mem_pool, &mem_pool, &eval));
1516 EXPECT_OK(eval->Open(&state));
1517 EXPECT_EQ(0, RawValue::Compare(eval->GetValue(nullptr), &value, type))
1518 << "type: " << type << ", value: " << value;
1519 eval->Close(&state);
1520 expr->Close();
1521 state.ReleaseResources();
1522}
1523
1524template <typename T>
1525void ExprTest::TestSingleLiteralConstruction(

Callers

nothing calls this directly

Calls 7

CreateClass · 0.85
TQueryCtxClass · 0.50
ColumnTypeClass · 0.50
OpenMethod · 0.45
GetValueMethod · 0.45
CloseMethod · 0.45
ReleaseResourcesMethod · 0.45

Tested by

no test coverage detected