-
-
Notifications
You must be signed in to change notification settings - Fork 1
chore: update to DuckDB 1.4.0 and release v0.0.2-beta #62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR upgrades the DuckDB dependency from version 1.3.2+ to exactly version 1.4.0 and releases version 0.0.2-beta of the project. The primary change ensures compatibility with DuckDB 1.4.0 by materializing RecordBatchReader results into pyarrow Tables throughout the codebase.
- Upgrade DuckDB dependency to exactly version 1.4.0
- Add
_ensure_arrow_table()
method to handle different Arrow result types from DuckDB - Update project version to 0.0.2b0 and refresh README documentation
Reviewed Changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/mpzsql/backends/duckdb_backend.py | Adds Arrow result materialization logic and updates all DuckDB query executions to use the new helper method |
src/mpzsql/init.py | Updates version string from 0.1.0 to 0.0.2b0 |
pyproject.toml | Pins DuckDB dependency to exactly version 1.4.0 and updates project version |
README.md | Updates documentation to mention DuckDB 1.4.0 target and DuckLake 0.3 release |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
if isinstance(arrow_result, Iterable): | ||
batches = list(arrow_result) | ||
if batches and all(isinstance(batch, pa.RecordBatch) for batch in batches): | ||
return pa.Table.from_batches(batches) | ||
if hasattr(arrow_result, "schema") and isinstance( | ||
arrow_result.schema, pa.Schema | ||
): | ||
return pa.table({}, schema=arrow_result.schema) |
Copilot
AI
Sep 17, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The isinstance(arrow_result, Iterable)
check will match strings and other non-RecordBatch iterables, potentially causing unexpected behavior. Consider checking for more specific types like pa.RecordBatchReader
or use a more restrictive type guard.
Copilot uses AI. Check for mistakes.
- Remove problematic _ensure_arrow_table method and its dependencies - Restore direct .arrow() calls without additional materialization wrappers - Remove collections.abc.Iterable and typing.Any imports - Revert all DuckDB 1.4.0 compatibility changes that caused issues This rollback restores the duckdb_backend.py file to commit 5910739, which was the last known working state before the problems started.
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68cabfe203b0832fb30a67ed9df90583