Skip to content

fix(deps)!: bump SQLQuack to 0.22.1 and SQLClean to 0.11.1 - #1606

Closed
kvlonge wants to merge 6 commits into
mainfrom
build/bump-sqlquack-0-22
Closed

kvlonge wants to merge 6 commits into
mainfrom
build/bump-sqlquack-0-22

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

Why

SQLQuack 0.22.1 analyses about a quarter faster, and SQLClean 0.11.1 lints on that same SQLQuack, so SQLBuild moves both pins together and keeps one SQLQuack in the build. SQLClean's lint now takes a function-call depth, so the Rules can use SQLBuild's shared 256 instead of SQLClean's own limit.

Changes

  • Pin SQLQuack to v0.22.1 and SQLClean to v0.11.1; the lockfile changes only those crates.
  • Read the new trees as before: adjacent string literals as one string, BigQuery's raw and adjacent bytes as byte strings, Snowflake named types such as NUMBER(10, 2) as the type they denote.
  • Source drift reads a comma FROM item's joins, which SQLQuack 0.22 keeps inside the item in PostgreSQL, Databricks, DuckDB and SQL Server: a join USING a column the source gains, or an unqualified name in its ON clause, marks the model for analysis again.
  • Every linted body is sent with the shared MAX_FUNCTION_CALL_DEPTH; the parse-guard check fails when a SQLClean lint or format request leaves it out.
  • The compile ratio jobs get 60 minutes instead of 45: with this lockfile change both release builds run cold and took past 40 minutes, so they were cancelled before comparing.
  • J05 in the semantic corpus (an ON clause naming a later table) is now a B004 compile error, so it moves from pending to invalid.
  • Breaking: SQLClean refuses PostgreSQL, BigQuery and Databricks SQL nested more than 512 levels, as it already did for Snowflake and DuckDB, so such a resource is reported as rules-unevaluated unless its Rules are ignored.

Verification

  • New tests that fail without the change: comma-item joins in source drift for PostgreSQL, DuckDB and Databricks.
  • Rules lint audits, SQL tests and models at 256 nested calls and refuse a model at 257; dialect tests cover the 512 ceiling.
  • cargo tests for sqlbuild-analysis and sqlbuild-rules, format, rules and lint integration and E2E tests, clippy, fensu, make check-ci.

SQLQuack 0.22.1 analyses about a quarter faster, and SQLClean 0.11.1
lints on that same SQLQuack, so the lockfile keeps one copy.

The new trees are read as their old meaning:
- Adjacent string literals are one Literal::JoinedString, read as the
  joined string in the Rules query facts and the SQL tree's literals.
  BigQuery's new raw and adjacent bytes literals read as byte strings.
- A Snowflake cast target can be a named type such as NUMBER(10, 2),
  read through DataType::unnamed as the type it denotes; a named type
  that does not deserialize is now an error instead of passing as
  written.
- The BigQuery and Databricks type patterns ignore the new spelling
  field.

BigQuery and Databricks now refuse nesting only past 512 levels, and
the Databricks parser reads VACUUM, so those dialect tests nest 600
levels and use REPAIR PRIVILEGES as the construct it cannot read.
SQLClean's formatter now declines a DuckDB body whose nested block
comment holds an apostrophe, leaving it as written; that case keeps
its Databricks check. Built-in rules gain guards for joins after a
comma FROM item in DuckDB, PostgreSQL and Snowflake, and for adjacent
string literals compared with an enum column.

BREAKING CHANGE: SQLClean refuses PostgreSQL, BigQuery and Databricks
SQL nested more than 512 levels, such as 600 UNION ALL operands, as
it already did for Snowflake and DuckDB, so such a resource is now
reported as rules-unevaluated unless its Rules are ignored.
SQLQuack 0.22 keeps each comma item's joins inside the item, as a
joined table, in PostgreSQL, Databricks, DuckDB and SQL Server. Source
drift read only the select's own joins, so a join USING a column the
source gains, or an unqualified name in its ON clause, after a comma
item no longer marked the model for analysis again. An unaliased
joined FROM item now contributes its left side and its joins as the
select's own joins do.
SQLClean's lint request takes max_function_call_depth. SQLBuild now
sends its shared MAX_FUNCTION_CALL_DEPTH with every body it lints, as
it already did when formatting, so the compiler and the Rules refuse
the same nesting. The parse-guard check also fails when a source sends
a SQLClean lint request or builds SQLClean's FormatRequest without the
shared depth.

With one limit, audits and SQL tests nested past it are compile errors
rather than resources the Rules could not evaluate, so those end-to-end
cases now check that the Rules lint them at the limit. A model nested
one call past it is still reported unevaluated.
@kvlonge
kvlonge enabled auto-merge November 20, 2026 03:33
…eclines

SQLClean 0.11.1's formatter declines a body whose nested block comment
holds an apostrophe, in DuckDB, Databricks and PostgreSQL alike, and
leaves it as written with a format fault, so the case no longer
formats in any dialect.
@kvlonge
kvlonge added this pull request to the merge queue Nov 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 20, 2026
SQLQuack 0.22 scopes a join's ON clause to the tables before it, so
J05, an ON clause naming a table joined later, is now a B004 compile
error rather than a pending case.
@chio-labs-delivery
chio-labs-delivery Bot added this pull request to the merge queue Nov 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 20, 2026
@kvlonge
kvlonge added this pull request to the merge queue Nov 20, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Nov 20, 2026
@kvlonge
kvlonge added this pull request to the merge queue Nov 20, 2026
@kvlonge
kvlonge removed this pull request from the merge queue due to a manual request Nov 20, 2026
@kvlonge

kvlonge commented Nov 20, 2026

Copy link
Copy Markdown
Contributor Author

Held for a batch PR: this branch is merged into the local integration branch and will land with the next batch.

@kvlonge kvlonge closed this Nov 20, 2026
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