[Enh]: Document and test chDB interoperability through Arrow
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 65/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- python
- Domain
- documentation, testing
Research direction
Start by reading the Arrow interoperability documentation and existing tests for nw.from_arrow; the issue does not name specific files. Add coverage for the listed value types, empty results, and row order, then include a chDB example explaining that conversion materializes results and later operations are not pushed down. Check performance on representative result sizes; done means the tests, documentation, and performance check cover the stated scope.
Written by the indexing model from the issue text.
Description
Context
chDB DataStore exposes the Arrow C Stream interface. Its results can already be passed to Narwhals with:
nw.from_arrow(datastore, backend="pyarrow")
This allows Narwhals-based libraries to consume chDB results without converting through pandas.
Scope of this issue
This proposal covers Arrow interoperability only.
- Add an interoperability test using
nw.from_arrow - Cover nullable values, unsigned integers, strings, nested types, empty results, and row order
- Add a short chDB example to the Arrow interoperability documentation
- Clearly document that the conversion executes and materializes the chDB result
- Check conversion performance on representative result sizes
After conversion, subsequent Narwhals operations run on the selected Arrow backend. They are not pushed down to chDB.
Possible follow-up: native chDB backend
If there is community interest, we can explore a native Narwhals backend for chDB as a separate follow-up.
A native backend would keep Narwhals expressions lazy and translate operations such as filtering, projection, sorting, and aggregation into chDB queries. This would:
- avoid materializing unnecessary intermediate results
- reduce data transfer by reading only the required rows and columns
- keep query planning and execution inside chDB
- make ClickHouse execution available to libraries built on Narwhals
- improve performance for larger-than-memory and multi-step analytical workloads
We would appreciate feedback on the initial Arrow integration and whether native chDB execution would be useful to the Narwhals community.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 242
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 49
Getting set up
- No Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from narwhals-dev/narwhals
-
Export `EagerAllowed` and `IntoBackend` from stable.v2Possibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
narwhals-dev/narwhals#4154 ·
Maintainers usually reply within 1 day
-
ci ibis
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
narwhals-dev/narwhals#3726 · 6 comments ·
Maintainers usually reply within 1 day
-
dask
Difficulty 4/5 3-5 days Newbie friendliness 48/100
narwhals-dev/narwhals#4153 ·
Maintainers usually reply within 1 day
-
`&`, `|` and `^` on integer columns are inconsistent across backendsPossibly taken A pull request linked to this issue is open or already merged. Open
Difficulty 4/5 3-5 days Newbie friendliness 55/100
narwhals-dev/narwhals#4150 ·
Maintainers usually reply within 1 day
-
`Series.scatter`: wrong results for duplicate, negative, out-of-bounds and null indices (pyarrow), and dtype issues (pandas)Possibly taken A pull request linked to this issue is open or already merged. Openbug: incorrect result
Difficulty 4/5 3-5 days Newbie friendliness 48/100
narwhals-dev/narwhals#4145 · 1 comment ·
Maintainers usually reply within 1 day
All issues in narwhals-dev/narwhals
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
dbt-labs/spark-utils#51 ·
-
bug pydanty:is-working
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
pydantic/pydantic-ai#13444 ·
Maintainers usually reply within 1 day
-
good first issue help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
good first issue help wanted
Difficulty 1/5 Under an hour Newbie friendliness 72/100
-
changelog investigate
Difficulty 1/5 Under an hour Newbie friendliness 68/100
ramnes/notion-sdk-py#502 ·