MCPcopy Create free account
hub / github.com/apache/impala / HandleDropFunction

Method HandleDropFunction

be/src/exec/catalog-op-executor.cc:235–264  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

233}
234
235void CatalogOpExecutor::HandleDropFunction(const TDropFunctionParams& request) {
236 DCHECK(fe_ != NULL) << "FE tests should not be calling this";
237 // Can only be called after successfully processing a catalog update.
238 DCHECK(catalog_update_result_ != NULL);
239
240 // Lookup in the local catalog the metadata for the function.
241 TCatalogObject obj;
242 obj.type = TCatalogObjectType::FUNCTION;
243 obj.fn.name = request.fn_name;
244 obj.fn.arg_types = request.arg_types;
245 obj.fn.signature = request.signature;
246 obj.__isset.fn = true;
247 obj.fn.__isset.signature = true;
248
249 TCatalogObject fn;
250 Status status = fe_->GetCatalogObject(obj, &fn);
251 if (!status.ok()) {
252 // This can happen if the function was dropped by another impalad.
253 VLOG_QUERY << "Could not lookup function catalog object: "
254 << apache::thrift::ThriftDebugString(request);
255 return;
256 }
257 // This function may have been dropped and re-created. To avoid removing the re-created
258 // function's entry from the cache verify the existing function has a catalog
259 // version <= the dropped version. This may happen if the update from the statestore
260 // gets applied *before* the result of a direct-DDL drop function command.
261 if (fn.catalog_version <= catalog_update_result_->version) {
262 LibCache::instance()->RemoveEntry(fn.fn.hdfs_location);
263 }
264}
265
266void CatalogOpExecutor::HandleDropDataSource(const TDropDataSourceParams& request) {
267 DCHECK(fe_ != NULL) << "FE tests should not be calling this";

Callers

nothing calls this directly

Calls 4

ThriftDebugStringFunction · 0.85
RemoveEntryMethod · 0.80
GetCatalogObjectMethod · 0.45
okMethod · 0.45

Tested by

no test coverage detected