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

SHOW FUNCTIONS allowed syntax does not match source/intent #1399

Open
findepi opened this issue Aug 24, 2024 · 3 comments
Open

SHOW FUNCTIONS allowed syntax does not match source/intent #1399

findepi opened this issue Aug 24, 2024 · 3 comments

Comments

@findepi
Copy link
Member

findepi commented Aug 24, 2024

SHOW FUNCTIONS
https://github.com/sqlparser-rs/sqlparser-rs/blob/7282ce22f9f031a2c9fd5831427f01f2f0dbb978/src/ast/mod.rs#L2450-L2453

it allow syntax

SHOW FUNCTIONS
SHOW FUNCTIONS LIKE 'pattern'
SHOW FUNCTIONS ILIKE 'pattern' 
SHOW FUNCTIONS WHERE <expr>

however, it's also documented to match Presto's SHOW FUNCTIONS
which doesn't allow ILIKE nor WHERE (and wouldn't know how the WHERE should be applied)
https://prestodb.io/docs/current/sql/show-functions.html

worth noting that Trino's SHOW FUNCTIONS is similar, but allows additional schema filter
https://trino.io/docs/current/sql/show-functions.html

@findepi
Copy link
Member Author

findepi commented Aug 24, 2024

My read on this is that this is a editorial mistake. ShowStatementFilter would be suitable for SHOW FUNCTION STATUS statement (MySQL-specific).
If we want to have Presto/Trino-specific SHOW FUNCTIONS, should we drop syntax that neither of them supports?

@alamb
Copy link
Contributor

alamb commented Sep 10, 2024

@alamb
Copy link
Contributor

alamb commented Sep 10, 2024

I think changing the parser support to mroe accurately reflect different dialects makes sense to me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants