Run the test. Returns True if passed, False if failed.
(self)
| 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 | |
| 282 | class TestSymbolMultipleRowGroups(ParquetCompatTest): |
nothing calls this directly
no test coverage detected