ververica / flink-sql-gateway

Apache License 2.0
490 stars 187 forks source link

Parse reset, describe and explain statements with SQL parser #40

Closed tsreaper closed 4 years ago

tsreaper commented 4 years ago

Previously we parse reset, describe and explain statements with regexps, which does not support parsing multiple statements and comments, and is also not standard.

This PR parses reset, describe and explain statements with SQL parser. SQL parser recognize these three commands in a slightly different way:

godfreyhe commented 4 years ago

Thanks for the pr @TsReaper , please update README.md

godfreyhe commented 4 years ago

merged

fpompermaier commented 4 years ago

Why SHOW CURRENT CATALOG and SHOW CURRENT CATALOG have been removed from README? At the contrary, they have been consolidated..

tsreaper commented 4 years ago

Why SHOW CURRENT CATALOG and SHOW CURRENT CATALOG have been removed from README? At the contrary, they have been consolidated..

SHOW CURRENT CATALOG/DATABASE are our self-defined statements and are not standard. We would like the statements we exposed to the users to be standard, or should at least be supported by Flink's SQL parser. You can of course "secretly" use these statements, but it might be possible that we change these statements to something more standard in the future.

fpompermaier commented 4 years ago

I don't know..show current catalog/database are a must have to me, so they must be provided at least in the SQL Gateway. Maybe we can keep them in the README.md and just separate in a better way the custom ones from the official supported, telling that they will eventually converge. Having hidden feature is quite useless to me