posit-dev / posit-dev/querychat

Allow mixing DataFrameSource and PinSource in multi-table sessions

Open
#256 0 comments 0 reactions 0 assignees View on GitHub

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_compatibility to 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 just DataFrameSource
  • Update the routing in _build_query_executor accordingly

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.