[2.0.4] - 2023-04-14
Highlights
This is primarily a bugfix and dialect release:
- Several bugfixes related to templating and indentation, in particular some improvements to the indentation of aliases and window functions.
- Performance improvements to the parser.
- The
--persist-timingoption is now also available onsqlfluff fix. - A refresh to getting started and rule documentation.
- Dialect improvements to PostgreSQL, Athena, SparkSQL, MySQL & Snowflake.
Thanks also to @james-johnston-thumbtack and @Thashin who made their first contributions in this release. In particular, @james-johnston-thumbtack made twenty one contributions in their first month! πππ
Whatβs Changed
- SparkSQL: Improvements to lateral view, hints, sort by #4731 @bmorck
- Add ExpressionSegment to CREATE TABLE ... DEFAULT / Fix multiple parse issues in Expression_A_Grammar #4717 @james-johnston-thumbtack
- Add support for the PG VACUUM statement #4742 @james-johnston-thumbtack
- Simplify and fix PG array accessor segment & support expressions #4748 @james-johnston-thumbtack
- SparkSQL: Allow for any ordering of create table clauses #4721 @bmorck
- Suggested started config file #4702 @alanmcruickshank
- Indents on window functions #4560 @alanmcruickshank
- SparkSQL: Fix Group By Clause #4732 @bmorck
- Improve support for EXCLUDE table constraints in PG #4725 @james-johnston-thumbtack
- Add support for dropping multiple indexes in PG #4737 @james-johnston-thumbtack
- Recognize "on" value and integers for PG SET statement #4740 @james-johnston-thumbtack
- Improve interval expressions on MySQL #4746 @james-johnston-thumbtack
- Keep out zero length keywords #4723 @james-johnston-thumbtack
- Add PG support for CREATE SCHEMA AUTHORIZATION #4735 @james-johnston-thumbtack
- Add support for dropping multiple views with PostgreSQL #4736 @james-johnston-thumbtack
- Add CHAR VARYING data type for PG #4738 @james-johnston-thumbtack
- fix(athena): map type matching failed, array type only contains a datatype #4739 @timcosta
- Allow DML queries to be selectable in CTEs on PG #4741 @james-johnston-thumbtack
- Add the CREATE/DROP CAST statements to ANSI and PG #4744 @james-johnston-thumbtack
- Add support for PG SET ROLE / RESET ROLE #4734 @james-johnston-thumbtack
- Support Spark Iceberg DDL #4690 @bmorck
- Fix #4680 #4707 @alanmcruickshank
- Indent Aliases #4706 @alanmcruickshank
- SparkSQL: Improve window frame bounds #4722 @bmorck
- Add support for PG CREATE/ALTER/DROP PUBLICATION stmts #4716 @james-johnston-thumbtack
- SparkSQL: Create external table support #4692 @bmorck
- SparkSQL: Fix file literal lexing #4718 @bmorck
- Add PG DROP/REASSIGN OWNED statements #4720 @james-johnston-thumbtack
- SparkSQL: Add distinct to comparison operator #4719 @bmorck
- Rethink Rule Docs #4695 @alanmcruickshank
- Performance: Reduce calls to _prune_options #4705 @alanmcruickshank
- Snowflake: Add ReferencedVariableNameSegment to sample function #4712 @WittierDinosaur
- Mark AM02 as fix compatible #4714 @yoichi
- Fix LT01 spacing check in templated areas #4698 @james-johnston-thumbtack
- Don't do newline conversion on write #4703 @alanmcruickshank
- MySQL: CREATE/ALTER VIEW may take UNION #4713 @yoichi
- Preserve zero-length template segments #4708 @james-johnston-thumbtack
- CV06: don't flag files that don't have code #4709 @james-johnston-thumbtack
- Add a no-output option #4704 @alanmcruickshank
- Jinja templater: treat "import" and "from" as templated #4696 @james-johnston-thumbtack
- Capitalization rules ignore templated code only if configured to #4697 @james-johnston-thumbtack
- Update getting started docs #4700 @alanmcruickshank
- Add a default for config_keywords and remove noisy error. #4701 @alanmcruickshank
- Snowflake Select System Functions #4687 @Thashin
- SparkSQL: Add using and options clause to create view statement #4691 @bmorck
- MySQL: Add RETURN Statement #4693 @yoichi
- Safety valve for fixes in CV03 #4685 @alanmcruickshank
- Allow persist timing on
fixtoo. #4679 @alanmcruickshank - fix{dialect-snowflake}:Alter Table Column Set/Unset Tag #4682 @Thashin
- fix{dialect-snowflake}:Execute Task #4683 @Thashin
- Make version number an argument not an option in release script. #4677 @alanmcruickshank
New Contributors
- @Thashin made their first contribution in #4683
- @james-johnston-thumbtack made their first contribution in #4697