OmniSciDB  5ade3759e0
JoinTest Class Reference
+ Inheritance diagram for JoinTest:
+ Collaboration diagram for JoinTest:

Protected Member Functions

 ~JoinTest () override
 
void SetUp () override
 
void TearDown () override
 

Detailed Description

Definition at line 7344 of file ExecuteTest.cpp.

Constructor & Destructor Documentation

◆ ~JoinTest()

JoinTest::~JoinTest ( )
inlineoverrideprotected

Definition at line 7346 of file ExecuteTest.cpp.

7346 {}

Member Function Documentation

◆ SetUp()

void JoinTest::SetUp ( )
inlineoverrideprotected

Definition at line 7348 of file ExecuteTest.cpp.

References anonymous_namespace{ExecuteTest.cpp}::build_create_table_statement(), CPU, run_ddl_statement(), and run_multiple_agg().

7348  {
7349  auto create_test_table = [](const std::string& table_name,
7350  const size_t num_records,
7351  const size_t start_index = 0) {
7352  run_ddl_statement("DROP TABLE IF EXISTS " + table_name);
7353 
7354  const std::string columns_definition{
7355  "x int not null, y int, str text encoding dict"};
7356  const auto table_create = build_create_table_statement(
7357  columns_definition, table_name, {"", 0}, {}, 50, true, false);
7358  run_ddl_statement(table_create);
7359 
7360  TestHelpers::ValuesGenerator gen(table_name);
7361  const std::unordered_map<int, std::string> str_map{
7362  {0, "'foo'"}, {1, "'bar'"}, {2, "'hello'"}, {3, "'world'"}};
7363  for (size_t i = start_index; i < start_index + num_records; i++) {
7364  const auto insert_query = gen(i, i, str_map.at(i % 4));
7366  }
7367  };
7368 
7369  create_test_table("jointest_a", 20, 0);
7370  create_test_table("jointest_b", 0, 0);
7371  create_test_table("jointest_c", 20, 10);
7372  }
void run_ddl_statement(std::string ddl)
std::string build_create_table_statement(const std::string &columns_definition, const std::string &table_name, const ShardInfo &shard_info, const std::vector< SharedDictionaryInfo > &shared_dict_info, const size_t fragment_size, const bool delete_support=true, const bool replicated=false)
Definition: ExecuteTest.cpp:91
TQueryResult run_multiple_agg(std::string sql)
+ Here is the call graph for this function:

◆ TearDown()

void JoinTest::TearDown ( )
inlineoverrideprotected

Definition at line 7374 of file ExecuteTest.cpp.

References anonymous_namespace{ExecuteTest.cpp}::g_keep_test_data, and run_ddl_statement().

7374  {
7375  if (!g_keep_test_data) {
7376  auto execute_drop_table = [](const std::string& table_name) {
7377  const std::string ddl = "DROP TABLE " + table_name;
7378  run_ddl_statement(ddl);
7379  };
7380 
7381  execute_drop_table("jointest_a");
7382  execute_drop_table("jointest_b");
7383  execute_drop_table("jointest_c");
7384  }
7385  }
void run_ddl_statement(std::string ddl)
+ Here is the call graph for this function:

The documentation for this class was generated from the following file: