Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MySQL: Bug with rules LT02, LT05 #5884

Open
3 tasks done
gualtfor opened this issue May 16, 2024 · 0 comments
Open
3 tasks done

MySQL: Bug with rules LT02, LT05 #5884

gualtfor opened this issue May 16, 2024 · 0 comments
Labels
bug Something isn't working mysql

Comments

@gualtfor
Copy link

Search before asking

  • I searched the issues and found no similar issues.

What Happened

I have a query in MySQL and when apply the line sqlfluff fix extraction_notification.sql --rules CP01 --dialect ansi appear an error with LT02 y LT05

Expected Behaviour

There are not critical errors

Observed Behaviour

CRITICAL [LT02] Applying rule LT02 to 'C:\\Users\\Documents\\extraction_notification.sql' threw an Exception: can't multiply sequence by non-int of type 'str' TypeError: can't multiply sequence by non-int of type 'str'

CRITICAL [LT05] Applying rule LT05 to 'C:\\Users\\Documents\\extraction_notification.sql' threw an Exception: can't multiply sequence by non-int of type 'str' TypeError: can't multiply sequence by non-int of type 'str'

How to reproduce

the steps are:
1- Run the syntax:
sqlfluff fix extraction_notification.sql --rules CP01 --dialect ansi

2- check the query:
SELECT noti.public_id AS 'public_id', co.name AS 'empresa', inv.reference_number AS 'referencia' FROM core.notification noti INNER JOIN core.customer co ON noti.customer_id = co.customer_id LEFT JOIN core.invoice inv ON inv.invoice_id = noti.object_related_id AND noti.object_related = 'invoice'

Dialect

mysql

Version

sqlfluff, version 3.0.6

Configuration

[sqlfluff]
dialect = ansi

[sqlfluff:indentation]
tab_space_size = 4,
indented_joins = True,
indented_using_on = False,
template_blocks_indent = True

[sqlfluff:rules:capitalisation.keywords]
capitalisation_policy = upper

Are you willing to work on and submit a PR to address the issue?

  • Yes I am willing to submit a PR!

Code of Conduct

@gualtfor gualtfor added the bug Something isn't working label May 16, 2024
@github-actions github-actions bot added the mysql label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working mysql
Projects
None yet
Development

No branches or pull requests

1 participant