| 233 | } |
| 234 | |
| 235 | void 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 | |
| 266 | void CatalogOpExecutor::HandleDropDataSource(const TDropDataSourceParams& request) { |
| 267 | DCHECK(fe_ != NULL) << "FE tests should not be calling this"; |
nothing calls this directly
no test coverage detected