Github user gatorsmile commented on the pull request:
https://github.com/apache/spark/pull/12885#issuecomment-216936789
First, we do not refresh `FunctionRegistry` when we switch the database.
Thus, the current `FunctionRegistry` is a global registry. `FunctionRegistry`
need a concept of database.
Second, when the function is loaded, `FunctionRegistry` has an entry
`dbName.funcName`. This is not a clean way.
Third, I need to confirm what is the behavior of Hive. If what you said is
right, this looks strange to me. From users' perspective, they create a
function but they are unable to describe it to verify if the function exists or
not. They have to call the function for loading the function. This looks
strange to me. Some function call could be very expensive. This design does not
make sense to me.
Forth, I think the users are allowed to describe a function without
specifying the database name. At least, the parser allows it. If necessary, we
can add the current database name when checking `FunctionRegistry`. So far,
this is missing
Thanks for your inputs!
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]