Highlights
This is an alpha release of SQLFluff 4.0 to continue verification of the rust portions of the codebase. In particular to verify the inclusion of a rust parser. Rust support is still in beta, but from this release, users can install sqlfluff[rs] to get the parser and lexer running in rust. Current implementation does yield noticeable gains on large files and projects - although for small individual files, the overhead of moving data into rust means that performance is a tiny bit slower.
We do not recommend that users install this release except for testing and evaluation.
Big thanks to @keraion, who's been leading the way on this effort.
Additionally in this release:
- Several docs improvements
- Dialect improvements for Databricks, Snowflake, DuckDB, TSQL, BigQuery, Postgres & Oracle.
These will be added to the changelog properly in the full 4.0.0 release.
What’s Changed
- Optimise rust implementation by using sparse representations (#7354) @alanmcruickshank
- Update .gitattributes to exclude generated Rust code (#7356) @keraion
- docs: Update gettingstarted.rst (#7353) @annebelleo
- Sort reserved keywords in anti_template regex for deterministic output (#7339) @keraion
- Initial implementation of the Rust parser (#7342) @keraion
- Add INCLUDE and WHERE clause support to T-SQL inline table indexes (#7352) @copilot-swe-agent[bot]
- docs: Update tox installation command (#7336) @annebelleo
- Adds support for associative array of collections in Oracle. (#7330) @joaostorrer
- databricks: support for named parameters (#7204) @kyletl
- Adds support for
CREATE SYNONYM,DROP SYNONYMandALTER SYNONYMstatements in Oracle. (#7291) @joaostorrer - TSQL: Enhance GROUP BY clause to support T-SQL specific terminators (#7327) @peterbud
- DuckDB - add support for IN operator on strings, lists, and columns (#7273) @stevenlw-porpoise
- Postgres: Add support for composite-value expansion (#7322) @annebelleo
- TSQL: Change DATASOURCE to DATA_SOURCE in openrowset(bulk...) (#7316) @lynndb0
- Postgres: Identify type names for
CREATE TYPEandALTER TYPE(#7314) @annebelleo - Postgres: add support for RETURNING clause (#7317) @annebelleo
- TSQL: add fulltext catalog and openxml plus other fixes (#7311) @nathanthorell
- BigQuery: add support for FORMAT clause (#7310) @annebelleo
- BigQuery: explicitly define data types (#7305) @annebelleo
- CI: Update macos runners (#7270) @keraion
- chore(snowflake): alter dynamic table (un)set delimited values (#7279) @mrlannigan
- fix(rebreak): unhandled
NotImplementedErrorexception (#7285) @peterbud - Adds support for
CREATE DATABASE LINK,DROP DATABASE LINKandALTER DATABASE LINKstatements in Oracle. (#7284) @joaostorrer - update duckdb FILTER clause to make WHERE keyword optional (#7271) @stevenlw-porpoise
- TSQL: allow special characters in variable and table names (#7262) @peterbud
- Adds support for
ENABLE/DISABLEclause after constraints inCREATE TABLEstatements in Oracle. (#7250) @joaostorrer - Fix click version constraint, bumping to 8.3.x (#7297) @serl
- TSQL: new rule to remove empty batches (#7280) @peterbud
- Docs notes on releasing 4.0 (#7264) @alanmcruickshank
- Add instructions for agents (#7261) @peterbud
- Add support for new duckdb lambda syntax (#7256) @stevenlw-porpoise