Skip to content

fix: remove dead Spec.layer_sql/stat_sql bindings - #15

Merged
cpsievert merged 2 commits into
mainfrom
fix/remove-dead-spec-sql-accessors
Oct 14, 2026
Merged

cpsievert merged 2 commits into
mainfrom
fix/remove-dead-spec-sql-accessors

Conversation

@cpsievert

Copy link
Copy Markdown
Collaborator

Summary

Removes the Spec.layer_sql() / Spec.stat_sql() bindings and their smoke-test lines.

Why: these methods mirrored a vestigial Rust API. Since ggsql PR #82 (the scale-syntax rewrite, first released in v0.1.6), Spec::new() has populated the backing fields with vec![None; ...] — in every released crate including 0.5.2, these methods have always returned None. ggsql PR #569 (the dialect/SQL-construction centralization) removed them from the Rust API entirely, so they no longer compile against ggsql main. Beyond being dead, the concept itself no longer fits the architecture: per-layer SQL is now constructed centrally through the dialect layer at execution time, so a canonical per-layer SQL string on a post-execution Spec isn't well-defined.

Impact: none. The only usage in this repo was a smoke test asserting the calls don't crash (not that they return SQL), and neither querychat Python nor R calls them. Removing them restores forward-compatibility with ggsql main — important for local development against unreleased ggsql (e.g. the spatial validate fix in posit-dev/ggsql#588, needed by posit-dev/querychat#323).

Verification

Built and ran the full test suite against both configurations:

  • crates.io ggsql 0.5.2 (what CI uses): 139 passed
  • local ggsql main checkout (previously failed to compile with no method named layer_sql/stat_sql): 139 passed

No functional behavior changes; this is pure dead-API removal.

These methods mirrored a vestigial Rust API. Since ggsql PR #82 (the
scale-syntax rewrite, first released in v0.1.6), Spec::new() has
populated the backing fields with `vec![None; ...]` — the methods have
always returned None in every released crate. ggsql PR #569 (the
dialect/SQL-construction centralization) removed them from the Rust API
entirely, so they no longer compile against ggsql main.

Nothing consumes them: the only usage in this repo was a smoke test
asserting the calls don't crash, and querychat (R and Python) never
calls them. Removing them restores forward-compatibility with ggsql
main at zero functional cost.

Verified by building and testing against both crates.io ggsql 0.5.2
and a local ggsql main checkout.
@cpsievert
cpsievert marked this pull request as ready for review October 14, 2026 16:11
@cpsievert
cpsievert merged commit 38c33cf into main Oct 14, 2026
13 of 14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant