You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Typed error when a query requires spatial but the extension is unavailable #16
querychat's "maps" capability (posit-dev/querychat#323) needs to give the LLM actionable guidance when a ggsql query requires spatial features but the DuckDB spatial extension isn't available (never installed, or setup failed). Today querychat string-matches DuckDB error messages ("spatial" + "extension", or st_* catalog errors), which is fragile across DuckDB versions and only catches failures at execution time.
Proposal
Raise a dedicated exception type (e.g. SpatialExtensionError) when a query uses spatial features (DRAW spatial, ggsql:world, PROJECT TO <map>) and the spatial extension is unavailable — ideally at validate() time, since querychat already calls validate() before execute(), which would let callers gate on it without ever hitting DuckDB.
Callers can then catch a type instead of matching strings.
Activity