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

Unable to parse Trino dialect #5875

Open
2 of 3 tasks
zverok opened this issue May 13, 2024 · 0 comments
Open
2 of 3 tasks

Unable to parse Trino dialect #5875

zverok opened this issue May 13, 2024 · 0 comments
Labels
bug Something isn't working trino

Comments

@zverok
Copy link

zverok commented May 13, 2024

Search before asking

  • I searched the issues and found no similar issues.

What Happened

Unable to parse any query in the Trino dialect.
I searched through existing issues, and it seems that nobody has reported the problem.

And judging by the feature requests for some Trino features support, it typcially works, i.e. the problem doesn’t affect other people and should be specific to my setup, but I can’t guess what it might be.

Expected Behaviour

sqlfluff parse some_code.sql -d trino prints the parse tree

Observed Behaviour

$ sqlfluff parse scripts/tmp/test.sql -d trino
RuntimeError: Grammar refers to the 'Transient' keyword which was not found in the trino dialect.

The syntax in the query is not (yet?) supported. Try to narrow down your query to a minimal, reproducible case and raise an issue on GitHub.

Or, even better, see this guide on how to help contribute keyword and/or dialect updates:
https://github.com/sqlfluff/sqlfluff/wiki/Contributing-Dialect-Changes#keywords

How to reproduce

Content of test.sql might be any, in this case, say

create table users as (select name, email from old_users);

The error never changes regardless of the content of the file.

Dialect

Trino

Version

$ sqlfluff --version
sqlfluff, version 3.0.6

$ python --version
Python 3.11.6

Configuration

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

@zverok zverok added the bug Something isn't working label May 13, 2024
@github-actions github-actions bot added the trino label May 13, 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 trino
Projects
None yet
Development

No branches or pull requests

1 participant