Skip to content

Commit 5d4c152

Browse files
committed
simplify
1 parent 711656d commit 5d4c152

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

  • sql/core/src/main/scala/org/apache/spark/sql/execution/command

sql/core/src/main/scala/org/apache/spark/sql/execution/command/functions.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -265,11 +265,9 @@ case class RefreshFunctionCommand(
265265
// register overwrite function.
266266
val func = catalog.getFunctionMetadata(identifier)
267267
catalog.registerFunction(func, true)
268-
} else if (catalog.isRegisteredFunction(identifier)) {
268+
} else {
269269
// clear cached function.
270270
catalog.unregisterFunction(identifier)
271-
} else {
272-
throw new NoSuchFunctionException(identifier.database.get, functionName)
273271
}
274272

275273
Seq.empty[Row]

0 commit comments

Comments
 (0)