Expand description
pond_sql_query: read-only DataFusion SQL over the three Lance tables
(sessions / messages / parts), registered as LanceTableProviders on
a fresh per-call SessionContext. Read-only is enforced in two layers - a
single-SELECT pre-parse and sql_with_options with DDL/DML/statements all
disabled - so no statement that mutates the corpus or touches the filesystem
(INSERT/UPDATE/DELETE/CREATE/DROP/COPY/CREATE EXTERNAL TABLE/SET) can run.
Results render inline (row-capped) or export to a parquet/ndjson file the
caller fetches via the pond-sql-export:// resource (src/transport.rs).
Structs§
- Tables
- The three Lance datasets, fetched fresh per call so each query sees a
current snapshot (the handle freshness gate runs on each
Store::dataset).
Enums§
- Format
- Export serialization format. Vector columns are excluded and JSON columns
are decoded to text before encoding (see [
displayable]). - Mode
- How
pond_sql_queryreturns results. - Outcome
- Result of a successful
run. - SqlError
- Two error channels:
Queryis caller-fixable (parse/plan/exec/limits) and the tool surfaces it as anisErrorresult so the model self-corrects;Infrais an internal failure surfaced as a protocol error.
Constants§
- DEFAULT_
INLINE_ ROWS - Default inline row cap when the caller passes no
limit. - MAX_
INLINE_ ROWS - Upper bound on the caller-supplied inline
limit.
Functions§
- run
- Execute one read-only SQL query and return either a rendered table, a JSON payload, or encoded export bytes.