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

Method removeFunction

fe/src/main/java/org/apache/impala/catalog/Db.java:398–413  ·  view source on GitHub ↗

See comment in Catalog.

(Function desc)

Source from the content-addressed store, hash-verified

396 * See comment in Catalog.
397 */
398 public Function removeFunction(Function desc) {
399 synchronized (functions_) {
400 Function fn = getFunction(desc, Function.CompareMode.IS_INDISTINGUISHABLE);
401 if (fn == null) return null;
402 List<Function> fns = functions_.get(desc.functionName());
403 Preconditions.checkNotNull(fns);
404 fns.remove(fn);
405 if (fns.isEmpty()) functions_.remove(desc.functionName());
406 if (fn.getBinaryType() == TFunctionBinaryType.JAVA) return fn;
407 // Remove the function from the metastore database parameters
408 String fnKey = FUNCTION_INDEX_PREFIX + fn.signatureString();
409 boolean removeFn = removeFromHmsParameters(fnKey);
410 Preconditions.checkState(removeFn);
411 return fn;
412 }
413 }
414
415 public void removeAllFunctions() {
416 synchronized (functions_) {

Callers 3

removeFunctionMethod · 0.95
removeFunctionMethod · 0.95
dropFunctionMethod · 0.45

Calls 8

getFunctionMethod · 0.95
getBinaryTypeMethod · 0.95
signatureStringMethod · 0.95
functionNameMethod · 0.80
getMethod · 0.65
removeMethod · 0.45
isEmptyMethod · 0.45

Tested by

no test coverage detected