-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Implement SHOW FUNCTIONS #12266
Implement SHOW FUNCTIONS #12266
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thats a real nice initiative.
I would like to add tests to information_schema.slt
like show
function
Also we need to expose it to user documentation
It would be really nice if this could somehow include function documentation / signature. ive been wondering how i could get functions and their documentation into datafusion-tui. This is certainly a step in that direction. |
Co-authored-by: Oleks V <comphead@users.noreply.github.com>
&self, | ||
filter: Option<ShowStatementFilter>, | ||
) -> Result<LogicalPlan> { | ||
if filter.is_some() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are we planning to apply the filter in future?
For example for SHOW now it is possible to display specific parameter like
show datafusion.execution.batch_size
I think it would be interesting to show the function by filter so ther user can get the name and ideally the signature.
Later we can use this metadata table to obtain correct signature in unified way instead of hardcoding signatures like now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is a good idea.
however, i think sqlparser-rs has the syntax potentialy mixed up.
the filter syntax is borrowed from MySQL while the statement itself isn't borrowed from there, creating a unique mix. see apache/datafusion-sqlparser-rs#1399
it would be best to resolve this (either fix or close the issue) before jumping on the filtering support
Thank you for the feedback! In the related issue there is a discussion whether we want see #12144 |
Im not sure the implementation details that get descriptions / signatures to flow through here (so maybe this is already handled) but I think it would be cool if functions registered through function registries also had a way to include their relevant details. For example, we recently added |
See #12432 |
Thank you for your contribution. Unfortunately, this pull request is stale because it has been open 60 days with no activity. Please remove the stale label or comment or this will be closed in 7 days. |
superseded by @goldmedal 's #13799 |
Which issue does this PR close?
Closes #12144
Rationale for this change
see #12144
What changes are included in this PR?
Support for
Statement::ShowFunctions
by converting it directly to VALUES.Filters are not supported. The syntax for filters is subject to apache/datafusion-sqlparser-rs#1399
Are these changes tested?
Yes
Are there any user-facing changes?
Support for the SHOW FUNCTIONS statement.