Highlights
This release changes some of the interfaces between SQLFluff core and our plugin ecosystem. The only breaking change is in the interface between SQLFluff and templater plugins (which are not common in the ecosystem, hence why this is only a minor and not a major release).
For all plugins, we also recommend a different structure for their imports (especially for rule plugins which are more common in the ecosystem) - for performance and stability reasons. Some users had been experiencing very long import times with previous releases as a result of the layout of plugin imports. Users with affected plugins will begin to see a warning from this release onward, which can be resolved for their plugin by updating to a new version of that plugin which follows the guidelines.
For more details (especially if you're a plugin maintainer) see our release notes.
Additionally this release includes:
- Some internal performance gains which may cumulatively save roughly 10% of the time spent in the parsing phase of larger files.
- Improvements to the Simple API, including the ability to pass in a
FluffConfigobject directly, and better support for parsing config files directly from strings (see the included example). - A bugfix for
AM06. - A new
--warn-unused-ignoresCLI option (and corresponding config setting) to allow warnings to be shown if anynoqacomments in SQL files are unused. - Improvements to Redshift, Oracle, Clickhouse, Materialize & MySQL dialects.
- A selection of internal improvements, documentation and type hints.
Thanks also to @kaiyannameighu, @josef-v, @aglebov & @joaostorrer who made their first contributions as part of this release! πππ
Whatβs Changed
- Mypy: Ephemeral + Tuple Return on .parse() #5044 @alanmcruickshank
- Add support to oracle's global and private temporary tables #5039 @joaostorrer
- Redshift-dialect: Support GRANT USAGE ON DATASHARE #5007 @josef-v
- β Add strict typing for errors module #5047 @pwildenhain
- Less copying in the ParseContext #5046 @alanmcruickshank
- Adding support to use
ADD COLUMN IF NOT EXISTSsyntax onALTER TABLE#5035 @wfelipew - Closes #4815 #5042 @joaostorrer
- Fix for multiprocessing warnings. #5032 @alanmcruickshank
- Mypy gain: Remove unnecessary tuple construction in MatchResult #5045 @alanmcruickshank
- mypy strict in config #5036 @pwildenhain
- strict mypy: match_wrapper & match_logging #5033 @alanmcruickshank
- MyPy on errors, helpers, markers & context + remove ParseContext.denylist #5030 @alanmcruickshank
- Warn on unused
noqadirectives #5029 @alanmcruickshank - Even more mypy strict #5023 @WittierDinosaur
- Handle windows paths better in config files. #5022 @alanmcruickshank
- Fix for parsing of Oracle functions with named arguments #5027 @joaostorrer
- DOC: Fix .sqlfluff example in Getting Started #5026 @aglebov
- Fix: Add exception to the warning & config for the BaseRule. #5025 @alanmcruickshank
- Move from
make_templatetorender_funcin jinja and dbt #4942 @alanmcruickshank - Streamline imports to reduce initial load times #4917 #5020 @alanmcruickshank
- More mypy strict #5019 @WittierDinosaur
- Simple API config and examples #5018 @alanmcruickshank
- Fix some new linting issues #5021 @alanmcruickshank
- A step towards mypy strict #5014 @WittierDinosaur
- Materialize: Make RETURNING a reserved keyword #5017 @bobbyiliev
- Config from string and load default_config as resource #5012 @alanmcruickshank
- Documentation for the test suite (#2180) #5011 @alanmcruickshank
- Add support to oracle's listagg function #4999 @joaostorrer
- Assorted typehints #5013 @alanmcruickshank
- Refactor: Extract noqa methods and tests. #5010 @alanmcruickshank
- AM06 to ignore aggregate ORDER BY clauses #5008 @tunetheweb
- Bugfix: Treat Function name properly in grants #5006 @WittierDinosaur
- Redshift: Add Qualify Clause #5002 @WittierDinosaur
- Clickhouse Dialect - Support Dollar Quoted Literals #5003 @kaiyannameighu
New Contributors
- @kaiyannameighu made their first contribution in #5003
- @joaostorrer made their first contribution in #4999
- @aglebov made their first contribution in #5026
- @josef-v made their first contribution in #5007