Highlights
Major changes include:
- Improvements to rules L023, L045, L048, L052, L059 to make them more accurate.
- If
sqlfluff fixcannot find a stable fix afterrunaway_limititerations (default 10) then no fixes will be applied. - Addition of
--write-outputconfig to command line so prevent errors corrupting output. - Various dialect improvements
What’s Changed
- Redshift: Support DATETIME as a valid datatype (#2665) @PLBMR
- Support L033 for RedShift (#2661) @tunetheweb
- Fix mistakes in rule yaml tests (#2658) @juhoautio
- Fix parsing types and add check to test in future (#2652) @tunetheweb
- Spark3: Support for
SORT BYClause (#2651) @R7L208 - Migrate issue template from markdown to yaml (#2626) @zhongjiajie
- L048 - handle more statements and exclude casting operators (#2642) @tunetheweb
- MySQL support
CURRENT_TIMESTAMP()inCREATE TABLE(#2648) @tunetheweb - Postgres enhanced
DELETE FROMsyntax (#2643) @tunetheweb - Bug fix: L025 should consider BigQuery
QUALIFYclause (#2647) @barrywhart - Bug fix: L025 overlooking
JOIN ONclause if join expression in parentheses (#2645) @barrywhart - L045 not reporting unused CTEs if the query uses templating (#2641) @barrywhart
- Fix IndexError in L001 (#2640) @barrywhart
- L052: If require_final_semicolon is set, ensure semicolon after ALL statements (#2610) @barrywhart
- L023 to also fix extra newlines in CTE (#2623) @juhoautio
- Spark3: Enhancements for Set Operators (#2622) @R7L208
- Doc a better choice for default env (#2630) @juhoautio
- Ensure ordering of fix compatible and config in rules docs (#2620) @zhongjiajie
- Pin python version for tox -e mypy (#2629) @juhoautio
- Hitting the linter loop limit should be treated as an error (#2628) @barrywhart
- Allow file output directly from cli (#2625) @alanmcruickshank
- BigQuery
UNPIVOTandPIVOTfixes (#2619) @tunetheweb - L059 quoted identifiers bug (#2614) @tunetheweb
- Snowflake dialect: Adjust snowflake array access (#2621) @alanmcruickshank
- Spark3: Test Cases for
ORDER BYinSELECT(#2618) @R7L208 - Fix typos in 0.10.0 changelog (#2605) @tunetheweb
- TSQL: Indent IF clause expression segments (#2615) @jpers36
- Spark3: Enhancements for
LIMITClause (#2612) @R7L208 - Allow Bare Functions in column constraints (#2607) @tunetheweb
- Add Oracle at and double at sign (execution symbol) (#2608) @r0fls
- Spark3: Enhancements to
LIKEclause (#2604) @R7L208