Replies: 3 comments
-
The Trino parser is not a stable API, so using it for this purpose is not officially supported, but it was raised before:
Obviously, only formatting a query is not the same as analyzing it, but it can also catch some errors. |
Beta Was this translation helpful? Give feedback.
-
Thank you very much for your answer @nineinchnick I tested https://github.com/kokosing/trino-query-formatter but it does not detect the issue in my query:
It seems that it does not call the PR #13044 seemed very interesting. I'm a bit sad that both PRs were closed, but they are interesting starting points 👍 |
Beta Was this translation helpful? Give feedback.
-
The issues/PRs are closed, because the ideas were rejected. |
Beta Was this translation helpful? Give feedback.
-
Hi,
I am looking for a tool to perform static query analysis,
and be able to detect errors like
XXX must be an aggregate expression or appear in GROUP BY clause
without the need to deploy
trino
nor have a database with a vali schema.It does not seem that
trino
CLI offers a query linter.External tools like sqlfluff are not able to detect errors like
XXX must be an aggregate expression or appear in GROUP BY clause
:I think I found that this specific error is raised by AggregationAnalyzer.java.
Hence my question: is it possible to invoke some Java class/method to perform just query analysis on some
sql
query string input?PS: The link to your Slack channel seems dead there: https://trino.io/slack
Beta Was this translation helpful? Give feedback.
All reactions