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
Reshift dialect doesn't understand CONVERT function #3651
Comments
pdebelak
added a commit
to pdebelak/sqlfluff
that referenced
this issue
Jul 22, 2022
Fixes issue sqlfluff#3651. Previously, the first argument to the `convert` redshift function was interpreted as a column reference rather than a data type. This could cause rule L027 to fail since the data type wasn't qualified with a table name even though that doesn't make sense. This adds explicit handling for `convert` to eliminate that issue.
1 task
pdebelak
added a commit
to pdebelak/sqlfluff
that referenced
this issue
Jul 22, 2022
Fixes issue sqlfluff#3651. Previously, the first argument to the `convert` redshift function was interpreted as a column reference rather than a data type. This could cause rule L027 to fail since the data type wasn't qualified with a table name even though that doesn't make sense. This adds explicit handling for `convert` to eliminate that issue.
pdebelak
added a commit
to pdebelak/sqlfluff
that referenced
this issue
Jul 23, 2022
Fixes issue sqlfluff#3651. Previously, the first argument to the `convert` redshift function was interpreted as a column reference rather than a data type. This could cause rule L027 to fail since the data type wasn't qualified with a table name even though that doesn't make sense. This adds explicit handling for `convert` to eliminate that issue.
tunetheweb
pushed a commit
that referenced
this issue
Jul 23, 2022
Fixes issue #3651. Previously, the first argument to the `convert` redshift function was interpreted as a column reference rather than a data type. This could cause rule L027 to fail since the data type wasn't qualified with a table name even though that doesn't make sense. This adds explicit handling for `convert` to eliminate that issue.
Fixed in #3653 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Search before asking
What Happened
The redshift dialect thinks the data type identifier in the
CONVERT
function (see CAST and CONVERT docs) is a column identifier which can cause spurious lint errors.Expected Behaviour
The
CONVERT
function is correctly parsed with a data type identifier and a column identifier.Observed Behaviour
The
CONVERT
function is parsed as having two column identifier arguments.How to reproduce
You can see the
L027
rule failure is due tointeger
being parsed as a column identifier, not a data type identifier.Dialect
Redshift
Version
Configuration
None
Are you willing to work on and submit a PR to address the issue?
Code of Conduct
The text was updated successfully, but these errors were encountered: