-
Notifications
You must be signed in to change notification settings - Fork 106
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
Improve catalog function interface #4733
Conversation
@@ -358,29 +363,19 @@ void Catalog::addFunction(Transaction* transaction, CatalogEntryType entryType, | |||
} | |||
|
|||
void Catalog::dropFunction(Transaction* transaction, const std::string& name) { | |||
const auto entry = functions->getEntry(transaction, name); | |||
if (entry == nullptr) { | |||
if (!containsFunction(transaction, name)) { |
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.
should binder always call containsFunction first before calling dropFunction?
55b864a
to
81b7301
Compare
I tested the following:
|
Benchmark ResultMaster commit hash:
|
277cdee
to
631d7be
Compare
Benchmark ResultMaster commit hash:
|
Description
This is a followed-up PR of #4726. We now only expose FunctionEntry from catalog and hide FunctionCatalogSet. The same thing should be done for Macro but I kinda think it should first be moved as a separate CatalogSet. Right now in FunctionCatalogSet we have both
FunctionCatalogEntry
&MacroCatalogEntry
. Either they should be the same CatalogEntry or they belong to different CatalogSet.@acquamarin & @ray6080 we should discuss this.
Also @acquamarin can u test what will happen if we start doing
I suspect we don't throw properly in some of these edge cases.
Fixes # (issue)
Contributor agreement