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
Add parsing support for Postgres "EXPLAIN" statement #893
Comments
@roblevy , thanks for the Issue report! We might have to implement this seperately for different dialects, each one seems to have a slightly different syntax. So that we cover your use case, which dialects are you most likely to use? Docs for reference:
|
Hi Alan,
Thanks for responding so quickly! We're using Postgres over here...
Thanks
Rob
…On Fri, 26 Mar 2021, 11:01 Alan Cruickshank, ***@***.***> wrote:
@roblevy <https://github.com/roblevy> , thanks for the Issue report! We
might have to implement this seperately for different dialects, each one
seems to have a slightly different syntax. So that we cover your use case,
which dialects are you most likely to use?
Docs for reference:
- mysql: https://dev.mysql.com/doc/refman/5.7/en/explain.html
- postgres: https://www.postgresql.org/docs/9.1/sql-explain.html
- snowflake
https://docs.snowflake.com/en/sql-reference/sql/explain.html
- bigquery doesn't even support it 🤷
https://cloud.google.com/bigquery/query-plan-explanation
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#893 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABELHV2FV2GXXQ3UBB2UFETTFRSPFANCNFSM4Z2IJHFA>
.
|
@alanmcruickshank I ended up implementing the MySQL flavor as ANSI (it's the simplest case), and separately implemented a Snowflake and Postgres version, with Postgres being the most complicated (I actually had to spin up a Postgres on Docker to wrap my head around what's valid there) |
* Add ANSI + MySQL 'explain' * Add Snowflake explain 🥶 * Add the _more complicated_ postgres explain 🧪 * Update CHANGELOG ✏️ * Mypy 🧹
The first example from the Postgres EXPLAIN docs is:
Expected Behaviour
Observed Behaviour
Steps to Reproduce
Version
sqlfluff: 0.4.1
Python: 3.8.6
Configuration
No configuration file.
The text was updated successfully, but these errors were encountered: