-
Notifications
You must be signed in to change notification settings - Fork 5.5k
Extend SHOW FUNCTIONS #13974
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
Extend SHOW FUNCTIONS #13974
Conversation
7a92bcc to
59dffa1
Compare
presto-main/src/main/java/com/facebook/presto/sql/rewrite/ShowQueriesRewrite.java
Outdated
Show resolved
Hide resolved
e87a31e to
ba6221d
Compare
|
@rongrong Removed new session properties and configuration properties. Column name suggestions are welcome if needed. |
Description is quite important (Personally I feel it's actually more important than type parameters and return types when I use |
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.
This should be a function derived from RoutineCharacteristics.language. Actually is it better to expose language rather than implementation type?
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.
Language is an attribute for SqlInvokedFunction only. If we expose this information as an agglomerated enum such as in (BUILTIN, SQL, PYTHON, JS...), I would avoid reuse the name language, maybe function type?
Also, as you mentioned, we may also want to ship SqlInvokedFunctions that are static and packaged within Presto, which type value do we give them? They are both BUILTIN and SQL, so use a new enum BUILTIN_SQL, or PREPACKAGED_SQL?
An alternative I would prefer is to introduce 2 columns instead.
- boolean built_in:
true: hard-coded functions, and pre-packagedSqlInvokedFunctionsfalse: user-defined functions.
- varchar language:
null: hard-coded functions- non-null values (SQL, Python, etc...): all
SqlInvokedFunctions, including pre-packaged and user-defined.
I'm essentially defining "built_in" as anything that comes in with the presto installation, which I think does make sense.
4bc99f6 to
60cfbef
Compare
|
@rongrong Separated into 2 columns: |
c5c4fdd to
dd684b5
Compare
Also, added additional assertions.
presto-main/src/main/java/com/facebook/presto/sql/rewrite/ShowQueriesRewrite.java
Outdated
Show resolved
Hide resolved
0ffe51d to
8c0409b
Compare
Uh oh!
There was an error while loading. Please reload this page.