Skip to content

feat: format Databricks with SQLQuack - #57

Merged
kvlonge merged 2 commits into
mainfrom
feat/databricks-format
Nov 10, 2026
Merged

kvlonge merged 2 commits into
mainfrom
feat/databricks-format

Conversation

@kvlonge

@kvlonge kvlonge commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Why

SQLQuack now has a native Databricks formatter profile, and SQLClean already pins a SQLQuack commit that includes it (f53c6a07). Until now SQLClean reported Databricks formatting as unavailable and left every Databricks query as written.

Changes

  • Cargo.toml: sqlquack-format gains the databricks feature. Cargo.lock does not change.
  • The formatter maps the databricks dialect to SQLQuack's Databricks profile.
  • Corpus test: Databricks now expects 61 formatted and 1 refused, and the unavailable-corpus test is removed.
  • Two named Databricks departures in sqlquack_departures.json:
    • SELECT ${x} FROM ${y} … is refused and left as written with a warning. ${x} is a substitution Databricks replaces before parsing, so the native parser rejects it.
    • get_json_object(...) is upper-cased, as every other call is in every dialect.
  • The configuration docs and the generated skill copy now say Databricks is formatted.
  • The e2e command test now expects format to lay out a Databricks file.

Verification

  • 60 of the 62 Databricks corpus queries come out byte-identical to SQLClean's previous layout. The two departures above account for the rest.
  • cargo test --all --locked, cargo clippy --all-targets -- -D warnings, cargo fmt --check, make check-docs-skill and uv run pytest tests (72 passed, native package rebuilt from this branch) all pass.
  • Format/check/fingerprint corpus dump against v0.6.5's code: only the format databricks lines differ (124 lines: 122 now formatted, 2 the ${x} refusal). Every other dialect is byte-identical.

Databricks files are laid out by SQLQuack's Databricks profile, which
reads them with the Databricks scanner and parser. Of the 62 Databricks
corpus queries, 60 come out as SQLClean laid them out before. A ${x}
variable substitution, which the Databricks parser rejects, is left as
written with a warning, and get_json_object is upper-cased as every
other call is.
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

Deploying sqlclean with  Cloudflare Pages  Cloudflare Pages

Latest commit: 98a19b8
Status: ✅  Deploy successful!
Preview URL: https://89a4b13f.sqlclean.pages.dev
Branch Preview URL: https://feat-databricks-format.sqlclean.pages.dev

View logs

@kvlonge
kvlonge merged commit e027a95 into main Nov 10, 2026
17 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