apache / apache/datafusion-sqlparser-rs

`SHOW FUNCTIONS` allowed syntax does not match source/intent

Open
#1,399 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
3.5k
Forks
772
Avg merge
4d 9h
Merged PRs (30d)
17

Description

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
```

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

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at src/ast/mod.rs lines 2450-2453 and compare the documented SHOW FUNCTIONS grammar with the linked Presto and Trino references. Determine which dialect behavior this parser intends to support, then align the accepted syntax and its documentation so the supported forms are consistent.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust, sql
Domain
compilers
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.