| 1502 | |
| 1503 | template <typename T> |
| 1504 | void 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 | |
| 1524 | template <typename T> |
| 1525 | void ExprTest::TestSingleLiteralConstruction( |
nothing calls this directly
no test coverage detected