Skip to content

Commit

Permalink
Enable DuckDB >= v0.8.0 (#114)
Browse files Browse the repository at this point in the history
* enable duckdb v0.9.0

* update test with mixed order schema
  • Loading branch information
d33bs authored Oct 5, 2023
1 parent d64f954 commit a5b5895
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 59 deletions.
97 changes: 42 additions & 55 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ keywords = ["python", "cellprofiler","single-cell-analysis", "way-lab"]
python = ">=3.8,<3.13"
pyarrow = "^13.0.0"
cloudpathlib = {extras = ["all"], version = "^0.15.0"}
duckdb = "^0.8.0"
duckdb = ">=0.8.0"
parsl = ">=2023.9.18"

[tool.poetry.dev-dependencies]
Expand Down
8 changes: 5 additions & 3 deletions tests/test_convert.py
Original file line number Diff line number Diff line change
Expand Up @@ -567,9 +567,6 @@ def test_to_parquet(

flattened_results = list(itertools.chain(*list(result.values())))
for i, flattened_result in enumerate(flattened_results):
parquet_result = parquet.ParquetDataset(
path_or_paths=flattened_result["table"]
).read()
csv_source = (
_duckdb_reader()
.execute(
Expand All @@ -581,6 +578,11 @@ def test_to_parquet(
)
.arrow()
)
parquet_result = parquet.ParquetDataset(
path_or_paths=flattened_result["table"],
# set the order of the columns uniformly for schema comparison
schema=csv_source.schema,
).read()
assert parquet_result.schema.equals(csv_source.schema)
assert parquet_result.shape == csv_source.shape

Expand Down

0 comments on commit a5b5895

Please sign in to comment.