Highlights
Major changes include:
- Changes rule L030 to use
extended_capitalisation_policyto support PascalCase BREAKING CHANGE - Fixes dbt error on ephemeral models
- Log warnings for fixes that seem to corrupt the parse SQL as may cause incorrect fixes in other rules.
- Bug fix to rule L011 for
implicitaliases - Bug fix to rule L019 for commas besides templated code
- Rule L051 can now optionally be applied to
LEFT/RIGHT/OUTER JOINs - Improvements to Test Suite
- Many dialect improvements
What's Changed
- Exasol: Fix
INTERVALliterals / expression #2804 @sti0 - Exasol: Add
IDLE_TIMEOUTandSNAPSHOT_MODE#2805 @sti0 - Exasol: Support value range clause within
INSERTstatements (7.1+) #2802 @sti0 - Exasol: Add lua adapter scripts (7.1+) #2801 @sti0
- Exasol: Add openid support for create/alter user (7.1+) #2800 @sti0
- Exasol: New consumer group params and unreserved keywords (7.1+) #2799 @sti0
- Snowflake: Complete
INSERTgrammar #2798 @jpy-git - Fix Postgres
VALUES, make Spark3VALUESconsistent #2797 @jpy-git - Postgres:
INSERT DEFAULTvalue #2796 @jpy-git - Postgres: Make
ASoptional in PostgresDELETE#2794 @jpy-git - BigQuery support
UNESTaliases #2793 @tunetheweb - Postgres: Add all range operators #2789 @jpy-git
- Snowflake: Complete
DELETE FROMgrammar #2792 @jpy-git - Postgres: Complete
DELETE FROMgrammar #2791 @jpy-git - Postgres: Add
RETURNINGgrammar toINSERT INTOstatement #2790 @jpy-git - Snowflake: Complete
PATTERNgrammar #2788 @jpy-git - Redshift: add
[ALTER/CREATE/DROP] PROCEDUREsegments #2774 @rpr-ableton - Spark3: Support for
ANALYZE TABLEstatement #2780 @R7L208 - Snowflake: Add
MATCH_RECOGNIZEclause #2781 @jpy-git - Snowflake: Complete
LIMITgrammar #2784 @jpy-git - Rough autofix for L028 #2757 @OTooleMichael
- Spark3 bug: Create with complex data types (#2761) #2782 @PhilippLange
- Snowflake: Complete
LIKEgrammar #2779 @jpy-git - Spark3: Auxiliary
FILEandJARstatements #2778 @R7L208 - Snowflake: Refine
SET/UNSETMASKING POLICYgrammar #2775 @jpy-git - L049 bug: correct over zealous
=-->IS#2760 @OTooleMichael - Make extenstion case insensitive #2773 @tunetheweb
- Snowflake: Add dollar quoted string literal #2770 @jpy-git
- Bug fix: L036 corrupts
SELECT DISTINCT idquery #2768 @barrywhart - Snowflake: Add
CHANGESclause #2764 @jpy-git - Spark3: Support for
EXPLAINstatement #2767 @R7L208 - Snowflake: Add
CONNECT BYclause #2763 @jpy-git - Spark3: Support for
TRANSFORMclause #2762 @R7L208 - Snowflake: Fix
GROUP BY {CUBE|ROLLUP|GROUPING SETS}parsing #2759 @jpy-git - BigQuery: allow identifiers starting with dash #2756 @tunetheweb
- Add
ignore_wordsoptions to L057 and L059 #2753 @tunetheweb - L012 bug fix for TSQL alternative alias types #2750 @tunetheweb
- Spark3: Support for
PIVOTclause #2752 @R7L208 - Update Redshift reserved keywords list #2751 @rpr-ableton
- L007 autofix #2735 @OTooleMichael
- L032 fixable in easy cases #2737 @OTooleMichael
- Fix dbt templater runtime error in
inject_ctes_into_sql()#2748 @barrywhart - L059: Exasol: Allow quotes around passwords in
CREATE USER#2744 @sti0 - Improve docs for
load_macros_from_path#2743 @barrywhart - Make L045 (Query defines a CTE but does not use it) case insensitive #2746 @barrywhart
- Add L049 test for T-SQL alternate alias syntax (
=) #2745 @barrywhart BaseSegment.pos_markeris typed as non optional but sometimes set toNone#2741 @barrywhart- Support Pascal case for L030 #2739 @tunetheweb
- Postgres, Redshift: Support
SIMILAR TOpattern matching expressions #2732 @PLBMR - Forgive shorthand cast only / bracket only expressions from L013 #2729 @OTooleMichael
- L052: Refactor
_eval()into individual functions to improve readability #2733 @barrywhart - L018: Move closing parenthesis to next line #2734 @barrywhart
- Improve rule yaml tests: assert that
fix_strpasses the rule #2624 @juhoautio - Extend rule L051 to
LEFT/RIGHT/OUTERJOINs #2719 @rpr-ableton - T-SQL: Allow aliases with
=#2727 @fdw - T-SQL: Support table variables #2728 @fdw
- Support for checking violations in YAML rule tests #2718 @juhoautio
- Roll back PR #2610 #2726 @barrywhart
- Redshift: Allow whitespace around cast operators #2721 @PLBMR
- Support database links in Oracle #2725 @tunetheweb
- Rule L019: Ignore comma placement violations if the adjacent code is templated #2717 @barrywhart
- T-SQL: Add drop constraint syntax #2724 @fdw
- ANSI: Support optionally bracketed CTE #2716 @OTooleMichael
- Spark3: Test cases for
CASEclause #2714 @R7L208 - Spark3: Support for
WINDOWfunctions #2711 @R7L208 - TSQL: Add variables as options for
RAISERRORparameters #2709 @jpers36 - TSQL: Add
OPTIONclause toUPDATE#2707 @jpers36 - Spark3: Test cases for
WHEREclause #2704 @R7L208 - Spark3: test cases for Table-Valued Functions #2703 @R7L208
- TSQL: Allow for optionally bracketed
PARTITION BYelements #2702 @jpers36 - TSQL: Fix
SET TRANSACTION ISOLATION LEVELparsing #2701 @jpers36 - Migrate tricky L004 tests to python #2681 @juhoautio
- Core linter enhancement: Check for successful parse after applying fixes #2657 @barrywhart
- Spark3: Support for
LATERAL VIEWclause #2687 @R7L208 - Document python requirement for tox/mypy & remove basepython from conf #2644 @juhoautio
- Fix rule L011 for implicit aliases #2683 @tunetheweb
- Pin markupsafe to prevent CI failures #2685 @tunetheweb
- Exasol: Allow
CROSSjoins #2680 @sti0 - Exasol: Improve function formatting #2678 @sti0
- TSQL: Add indentation for
CREATEINDEX/STATISTICS#2679 @jpers36 - Spark3: Support for
TABLESAMPLEclause #2674 @R7L208 - TSQL: Improve
RAISERRORfunctionality #2672 @jpers36 - Snowflake dialect update for
MERGE INTOpredicates #2670 @The-Loud - Assert that fix_str is set #2663 @juhoautio
New Contributors
- @The-Loud made their first contribution in #2670
- @OTooleMichael made their first contribution in #2716
- @PhilippLange made their first contribution in #2782