Skip to content

feat!: pin SQLQuack 0.22.0 and document the 512 nesting ceiling - #93

Merged
kvlonge merged 1 commit into
mainfrom
feat/sqlquack-0-22
Nov 19, 2026
Merged

kvlonge merged 1 commit into
mainfrom
feat/sqlquack-0-22

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

Why

SQLQuack 0.22.0 is published. It makes max_function_call_depth the exact limit in every linted dialect: before, Databricks and BigQuery stopped at 198 nested calls and Postgres at 299, whatever the setting. It also refuses any Postgres, BigQuery or Databricks statement nested past 512 levels, as Snowflake and DuckDB already did. At 512 the refusal explains the ceiling only when the SQL calls something.

Changes

  • Pin all six sqlquack-* crates to the v0.22.0 tag.
  • format tells SQLQuack's refusal hint whether the SQL calls anything, so a format refusal at 512 explains the ceiling the way check does.
  • Join facts read each comma item's joins. SQLQuack now keeps them inside the item in Postgres and Databricks, where sqlclean facts had started reporting no joins for FROM a JOIN b ON true, c.
  • Configuration and embedding docs say that the statement and every expression around the calls count toward 512, so a bare SELECT can nest at most 511 calls. The generated skill copies them.
  • CLI tests cover the limits in Databricks, BigQuery and Postgres.

BREAKING CHANGE: Postgres, BigQuery and Databricks files nested more than 512 levels deep, such as 600 UNION ALL operands, are now a SQLCLEAN999 finding and are left as written by format.

Verification

  • cargo test --all (42 + 8), Python tests (95) and make check-ci pass.
  • New tests fail without the change: the Postgres and Databricks comma-join facts (including table-function and parenthesized comma items), and the ceiling note in format refusals.
  • In all five checked dialects: limits 3 and 64 allow exactly 3 and 64 calls, the default refuses 257, and at 512 a bare SELECT lints 511 calls (510 with an alias or comparison, 509 in a CTE).
  • sqlclean facts joins match 0.10.0 on 62 join shapes in 5 dialects, and facts, format and check match 0.10.0 byte for byte on the Snowflake comparison files.

SQLQuack 0.22.0 makes max_function_call_depth the exact limit in every
linted dialect and refuses any statement nested past 512 levels in
Postgres, BigQuery and Databricks too, as it already did in Snowflake
and DuckDB. At 512 a refusal of SQL that calls something explains the
ceiling; call-free SQL gets the bare refusal.

- format passes whether the SQL calls anything to SQLQuack's refusal
  hint, so a format refusal at 512 explains the ceiling as check does.
- Join facts read each comma item's joins, which SQLQuack now keeps
  with the item in Postgres and Databricks, so facts match 0.10.0.
- Configuration and embedding docs say the statement and every
  expression around the calls count toward 512.
- CLI tests cover the limits in Databricks, BigQuery and Postgres.

BREAKING CHANGE: Postgres, BigQuery and Databricks files nested more
than 512 levels deep, such as 600 UNION ALL operands, are now a
SQLCLEAN999 finding and are left as written by format.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying sqlclean with  Cloudflare Pages  Cloudflare Pages

Latest commit: 48bc86c
Status: ✅  Deploy successful!
Preview URL: https://546f1bc3.sqlclean.pages.dev
Branch Preview URL: https://feat-sqlquack-0-22.sqlclean.pages.dev

View logs

@kvlonge
kvlonge merged commit 3af2a20 into main Nov 19, 2026
16 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