OmniSciDB  04ee39c94c
MultiFragMetadataUpdate Class Reference
+ Inheritance diagram for MultiFragMetadataUpdate:
+ Collaboration diagram for MultiFragMetadataUpdate:

Private Member Functions

void SetUp () override
 
void TearDown () override
 

Detailed Description

Definition at line 155 of file ComputeMetadataTest.cpp.

Member Function Documentation

◆ SetUp()

void MultiFragMetadataUpdate::SetUp ( )
inlineoverrideprivate

Definition at line 156 of file ComputeMetadataTest.cpp.

References CPU, anonymous_namespace{ComputeMetadataTest.cpp}::g_table_name, run_ddl_statement(), run_multiple_agg(), and to_string().

156  {
157  EXPECT_NO_THROW(run_ddl_statement("DROP TABLE IF EXISTS " + g_table_name + ";"));
158  EXPECT_NO_THROW(run_ddl_statement(
159  "CREATE TABLE " + g_table_name +
160  " (x INT, y INT NOT NULL, z INT "
161  "ENCODING FIXED(8), a DOUBLE, b FLOAT, d DATE, dd DATE "
162  "ENCODING FIXED(16), c TEXT ENCODING DICT(32)) WITH (FRAGMENT_SIZE=4);"));
163 
165 
166  for (int i = 0; i < 5; i++) {
167  std::string date_str = i % 2 == 0 ? "'1/1/2019'" : "'2/2/2020'";
168  const auto insert_query =
169  gen(i, i, i, i * 1.1, i * 1.2, date_str, date_str, "'foo'");
171  }
172 
173  for (int i = 0; i < 5; i++) {
174  std::string date_str = i % 2 == 0 ? "'5/30/2021'" : "'6/30/2022'";
175  const int multiplier = i % 2 == 0 ? -1 : 1;
176  const auto insert_query = gen(multiplier * i,
177  multiplier * i,
178  multiplier * i,
179  std::to_string(multiplier * i * 1.1),
180  multiplier * i * 1.2,
181  date_str,
182  date_str,
183  "'bar'");
185  }
186 
187  for (size_t i = 6; i < 11; i++) {
188  std::string insert_query;
189  if (i % 2 == 0) {
190  insert_query = gen(i, i, i, i * 1.1, i * 1.2, "null", "null", "'hello'");
191  } else {
192  insert_query = gen("null",
193  std::numeric_limits<int32_t>::min(),
194  "null",
195  "null",
196  "null",
197  "'10/11/1981'",
198  "'10/11/1981'",
199  "'world'");
200  }
201 
203  }
204 
205  for (int i = 0; i < 5; i++) {
206  const auto insert_query = gen("null",
207  std::numeric_limits<int32_t>::max(),
208  "null",
209  "null",
210  "null",
211  "null",
212  "null",
213  "null");
215  }
216  }
std::string to_string(char const *&&v)
void run_ddl_statement(std::string ddl)
TQueryResult run_multiple_agg(std::string sql)
+ Here is the call graph for this function:

◆ TearDown()

void MultiFragMetadataUpdate::TearDown ( )
inlineoverrideprivate

Definition at line 218 of file ComputeMetadataTest.cpp.

References anonymous_namespace{ComputeMetadataTest.cpp}::g_table_name, and run_ddl_statement().

218  {
219  EXPECT_NO_THROW(run_ddl_statement("DROP TABLE IF EXISTS " + g_table_name + ";"));
220  }
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: