Highlights
Major changes include:
- Dialect is now mandatory, either in command line, or in config BREAKING CHANGE
- Rename
spark3dialect tosparksqlBREAKING CHANGE - L027 now checks tables references exist BREAKING CHANGE
- New rule L063 to allow Datatypes to have a different capitalisation policy from L010. BREAKING CHANGE
- Refactor and performance improvements of Delimited and L003
- Many dialect improvements and fixes
What’s Changed
- MySQL: Allow
JOINs inUPDATEexpressions #3031 @zapion - Fix bug in patch generation for segments made of templated + literal fixes #3030 @barrywhart
- Formatters code cleanup #3029 @barrywhart
- Postgres better
CREATE USER/CREATE ROLEsupport #3016 @mrf - SparkSQL: Add
MERGEsyntax #3025 @PhilippLange - Remove Delimited workarounds #3024 @tunetheweb
- Add
excludeoption forRefgrammar #3028 @tunetheweb - SparkSQL: Adding support for Delta Lake table schema updates #3013 @R7L208
- L027: Check table aliases exists #2998 @dmohns
- Snowflake: Added support for
REMOVEstatements #3026 @WittierDinosaur - BigQuery: Support
WEEKfunction with days of weeks #3021 @tunetheweb - Sparksql quoted identifier in
STRUCT#3023 @PhilippLange - Force user to specify a dialect #2995 @barrywhart
- BigQuery: Parse
CREATE TABLEwith trailing comma #3018 @dmohns - Snowflake: Add
IS (NOT) DISTINCT FROMtest cases #3014 @kd2718 - BigQuery: Add support for column
OPTIONSinSTRUCTdefinitions #3017 @dmohns - PostgreSQL: added support for
CREATE ROLEandDROP ROLEstatements #3010 @dnim - Separate slow CI job to it's own workflow #3012 @tunetheweb
- SparkSQL: Test cases for Delta Variation of Writing a table #3009 @R7L208
- Snowflake: Added support for
CLUSTER BYand otherCREATE TABLEimprovements #3008 @WittierDinosaur - Support
TRIMfunction parameters #3007 @tunetheweb - BigQuery: Support
AT TIME ZONEinEXTRACT#3004 @tunetheweb - BigQuery: Move some keywords to unreserved #3002 @tunetheweb
- BigQuery: Allow quoted variable names in
DECLARE#3006 @dmohns - T-SQL: allow optional
ASkeyword in parameters def #3001 @pguyot - T-SQL: add support for
RETURNS @var TABLEsyntax #3000 @pguyot - T-SQL: add support for parenthesized nested joins #2993 @pguyot
- dbt: Read builtins from code #2988 @dmohns
- T-SQL: fix table type in
DECLAREstatements #2999 @pguyot - T-SQL: allow leading
GO#2997 @pguyot - T-SQL: add support for assignment operators #2996 @pguyot
- BigQuery: Add more
MERGEstatement variants #2989 @dmohns - L041: Fix bug when there is a newline after the select clause modifier #2981 @jmc-bbk
- Rule L045 doesn't recognise CTE usage in a subquery when rule L042 is enabled #2980 @barrywhart
- dbt: Make
is_incremental()defaults consistent #2985 @dmohns - Rename Grammars for consistency #2986 @tunetheweb
- Added support for MySQL
UPDATEStatements #2982 @WittierDinosaur - Redshift: Added
CREATE EXTERNAL SCHEMA, bugfix inPARTITION BY#2983 @WittierDinosaur - Added
ALTER INDEXandREINDEXto Postgres, Some Grammar Cleaning #2979 @WittierDinosaur - T-SQL grammar deduplication #2967 @tunetheweb
- L003 Refactor #2884 @OTooleMichael
- Delimited Refactor #2831 @WittierDinosaur
- SparkSQL: Support for querying snapshots when reading data with Delta Lake #2972 @R7L208
- Fix bug in L063 for BigQuery
STRUCTparams #2975 @tunetheweb - Fix assertion error in dbt templater when file ends with whitespace strip (
-%}) #2976 @barrywhart - Pass dbt vars to dbt #2923 @tcholewik
- BigQuery: Add support for column
OPTIONS#2973 @dmohns - BigQuery: Allow expressions in
OPTIONSclauses #2971 @dmohns - Bump black to 22.3.0 on pre-commit #2969 @pguyot
- T-SQL: Redefine
DatatypeIdentifierSegment#2959 @alanmcruickshank - T-SQL: Add support for
WAITFORstatement #2968 @pguyot - T-SQL: Add
WHILEstatement support #2966 @pguyot - T-SQL:
INTOis optional withinINSERTstatement #2963 @pguyot - Add basic
IS (NOT) DISTINCT FROMsupport in most dialects #2962 @tunetheweb - SparkSQL: Create Table Delta Lake Variant #2954 @R7L208
- T-SQL: Add support for
CREATE/DROP/DISABLETRIGGER#2957 @tunetheweb - Bug: L042 modifies parse tree even during "lint" #2955 @barrywhart
- Allow multiple post function clauses in Postgres and Redshift #2952 @aviv
- Fix bug in L022 for trailing comments in CTE #2946 @tunetheweb
- More dialect checking, fixes, inheritance cleanup #2942 @barrywhart
- T-SQL: Support
OUTPUTParams andGOTOStatements #2949 @tunetheweb - BREAKING CHANGE: change existing dialect name from
spark3tosparksql#2924 @R7L208 - Add Symend to SQLFluff In The Wild #2940 @HeyZiko
- Simplify segment creation and inheritance in dialects #2933 @barrywhart
- Snowflake: Add
ALTER STREAMsupport #2939 @HeyZiko - T-SQL: Handle multiple nested joins #2938 @tunetheweb
- Snowflake: Add
CREATE STREAMsupport #2936 @HeyZiko - T-SQL: Support nested joins #2928 @tunetheweb
- To replace base dialect segment class, must subclass or provide same stuff #2930 @barrywhart
- Add new rule L063 to allow separate capitalisation policy for Datatypes #2931 @tunetheweb
- Adds support for column definitions in table alias expressions #2932 @derickl
- BigQuery: support numeric aliases in
UNPIVOTclauses #2925 @tunetheweb - T-SQL: Supported nested
MERGEstatements #2926 @tunetheweb
New Contributors
- @HeyZiko made their first contribution in #2936
- @aviv made their first contribution in #2952
- @pguyot made their first contribution in #2963
- @dmohns made their first contribution in #2971
- @tcholewik made their first contribution in #2923
- @jmc-bbk made their first contribution in #2981
- @dnim made their first contribution in #3010
- @kd2718 made their first contribution in #3014
- @mrf made their first contribution in #3016
- @zapion made their first contribution in #3031