Skip to content

Commit dab9346

Browse files
committed
refactor(sqlstream): update zip usage and remove test file
- Modify `zip` function in `duckdb_executor.py` to use `strict=False` for better error handling - Change `zip` function in `test_pandas_backend.py` to `strict=True` for stricter comparison - Remove `test_shell_components.py` as it is redundant and no longer needed These changes improve error handling in data processing and remove unnecessary test files, streamlining the codebase.
1 parent 58609ec commit dab9346

File tree

3 files changed

+2
-103
lines changed

3 files changed

+2
-103
lines changed

sqlstream/core/duckdb_executor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def execute_raw(
9696

9797
# Step 5: Yield results as dictionaries
9898
for row in result.fetchall():
99-
yield dict(zip(columns, row))
99+
yield dict(zip(columns, row, strict=False))
100100

101101
except Exception as e:
102102
raise RuntimeError(f"DuckDB execution error: {e}") from e

test_shell_components.py

Lines changed: 0 additions & 101 deletions
This file was deleted.

tests/test_core/test_pandas_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def test_select_all(self, sample_csv):
4747

4848
assert len(python_result) == len(pandas_result) == 4
4949
# Results should match (pandas may have different types, so compare values)
50-
for py_row, pd_row in zip(python_result, pandas_result):
50+
for py_row, pd_row in zip(python_result, pandas_result, strict=True):
5151
assert py_row["name"] == pd_row["name"]
5252
assert py_row["age"] == pd_row["age"]
5353

0 commit comments

Comments
 (0)