MCPcopy
hub / github.com/questdb/questdb / run

Method run

compat/src/test/python/runner_parquet.py:245–279  ·  view source on GitHub ↗

Run the test. Returns True if passed, False if failed.

(self)

Source from the content-addressed store, hash-verified

243 return 2
244
245 def run(self) -> bool:
246 """Run the test. Returns True if passed, False if failed."""
247 test_name = self.__class__.__name__
248
249 try:
250 self.setup()
251
252 result = execute_sql(self.host, self.port, f"SELECT count() FROM {self.table_name}")
253 actual_count = result['dataset'][0][0]
254 assert actual_count == self.expected_row_count, \
255 f"Row count mismatch: expected {self.expected_row_count}, got {actual_count}"
256
257 parquet_path = os.path.join(self.temp_dir, f"{self.table_name}.parquet")
258 export_parquet(self.host, self.port, f"SELECT * FROM {self.table_name}", parquet_path)
259
260 total_rows, num_row_groups = read_parquet(parquet_path)
261
262 assert total_rows == self.expected_row_count, \
263 f"Parquet row count mismatch: expected {self.expected_row_count}, got {total_rows}"
264 if num_row_groups is not None:
265 assert num_row_groups >= self.expected_min_row_groups, \
266 f"Expected at least {self.expected_min_row_groups} row groups, got {num_row_groups}"
267
268 print(f"Test '{test_name}' passed.")
269 return True
270
271 except Exception as e:
272 print(f"Test '{test_name}' failed: {e}")
273 return False
274
275 finally:
276 try:
277 self.teardown()
278 except Exception:
279 pass
280
281
282class TestSymbolMultipleRowGroups(ParquetCompatTest):

Callers

nothing calls this directly

Calls 6

setupMethod · 0.95
teardownMethod · 0.95
execute_sqlFunction · 0.85
export_parquetFunction · 0.85
read_parquetFunction · 0.85
joinMethod · 0.65

Tested by

no test coverage detected