The above issue was caused because the function was not defined as a date part function.
I added TIMESTAMPDIFF and some functions whose signatures contain a unit in official documentation.
coverage: 99.985%. remained the same
when pulling 83a0c7dd046a4608b50580d541346eafc8c6b95c on kzosabe:mysql-date-part-function-name
into 1d4fd8d288e9d19aa544d3d92885b30788234470 on sqlfluff:main.
Brief summary of the change made
fixes #5854
The above issue was caused because the function was not defined as a date part function. I added
TIMESTAMPDIFF
and some functions whose signatures contain aunit
in official documentation.https://dev.mysql.com/doc/refman/8.0/en/date-and-time-functions.html
Are there any other side effects of this change that we should be aware of?
None
Pull Request checklist
[x] Please confirm you have completed any of the necessary steps below.
Included test cases to demonstrate any code changes, which may be one or more of the following:
.yml
rule test cases intest/fixtures/rules/std_rule_cases
..sql
/.yml
parser test cases intest/fixtures/dialects
(note YML files can be auto generated withtox -e generate-fixture-yml
).test/fixtures/linter/autofix
.Added appropriate documentation for the change.
Created GitHub issues for any relevant followup/future enhancements if appropriate.