Support create/drop function namespace#16792
Conversation
48b0ee2 to
7655159
Compare
|
I'm a bit confused. How does this work with the normal namespace (or schema) that we use for tables, views etc.? We should not mix the namespace concept with backend. Also, it's relatively uncommon I would think for someone to switch db for these metadata entities. So it will help if you can elaborate the use-case better. |
First, this will not affect the normal table and view. This is a traditional Second, it's low frequency operation within a single company. But for presto user who on the cloud, they all need different namespaces to distinguish their own functions. |
Function namespace is not a SQL concept. That's why it's confusing. Why can't you just use the normal namespace? In SQL, all entities live in a schema which is where all ACL etc are applied. SO I'm thinking if we can just use that instead of adding a new concept.
Same should hold for tables/views as well? |
7655159 to
6569bc5
Compare
You are right, I renamed |
|
Actually I'm saying don't create a separate schema just for functions. Use the existing schema concept and also not sure why you need create/drop - I'm not sure if we have good framework to support proper deletion without creating garbage and orphaned entities (lack of cascade). For tables it's generally fine but for functions this could be confusing. At a high level, I still think this is a backend metastore implementation concept that does not need a syntax. |
|
In fact, it is more confusing for presto users to use other databases to implement it. Users should not care about the details of the backend, just use our syntax. |
|
So if this is for admins? The description is not clear. If you can give a hypothetical use case, that will help a lot. |
|
You know Faas, a presto cluster of cloud vendors may be used by different users(Those users can only use Presto for calculation, not mysql) |
|
This pull request has been automatically marked as stale because it has not had recent activity. If you'd still like this PR merged, please comment on the task, make sure you've addressed reviewer comments, and rebase on the latest master. Thank you for your contributions! |
Background
Current function-namespace-managers rely on MySQL to store data. But presto users may not have permission to operate the database.

Even if the user has permission, it is troublesome to execute commands when switching databases.
So it is necessary to support function-namespace-managers in Presto's syntax.
Syntax