posit-dev / posit-dev/querychat
Allow mixing DataFrameSource and PinSource in multi-table sessions
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 212
- Forks
- 29
- Avg merge
- 22h 24m
- Merged PRs (30d)
- 27
Description
Currently check_source_compatibility uses a class-identity check (type(new) is not type(first)) that blocks natural blends of source types. In practice, DataFrameSource and PinSource both materialize an eager frame at construction and could share a single DuckDBExecutor — the identity check is the only thing stopping it.
What to change
- Loosen
check_source_compatibilityto group by capability (can this source produce an eager frame for DuckDB registration?) rather than exact class identity - Broaden
DuckDBExecutor.__init__to accept any source that satisfies this contract, not justDataFrameSource - Update the routing in
_build_query_executoraccordingly
Out of scope
Remote-source coalescing (SQLAlchemy/Ibis into a shared DuckDB via snapshot or live ATTACH) is explicitly deferred — snapshot mode requires full table materialization at startup which doesn't scale, and live attach introduces SQL dialect drift, lockdown relaxation, and per-dialect connection-string translation. This issue covers local materializable sources only.
Context
Identified during review of #195.
Contributor guide
No contributing guide indexed for this repository
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.
Research direction
Start with check_source_compatibility, DuckDBExecutor.init, and _build_query_executor to trace the current type-based routing. Update the compatibility contract for locally materializable sources, then verify that DataFrameSource and PinSource can share one executor while remote-source coalescing remains unchanged.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- backend, databases
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Clearly specified
- Newbie friendliness
- 68/100