srielau commented on code in PR #53570:
URL: https://github.com/apache/spark/pull/53570#discussion_r2689099543
##########
sql/core/src/main/scala/org/apache/spark/sql/execution/command/functions.scala:
##########
@@ -139,11 +140,27 @@ case class DropFunctionCommand(
override def run(sparkSession: SparkSession): Seq[Row] = {
val catalog = sparkSession.sessionState.catalog
if (isTemp) {
- assert(identifier.database.isEmpty)
- if (FunctionRegistry.builtin.functionExists(identifier)) {
- throw
QueryCompilationErrors.cannotDropBuiltinFuncError(identifier.funcName)
+ // Extract the function name, handling qualified names like
"system.session.func"
+ val funcName = if (identifier.database.isDefined) {
+ // Qualified name - validate it's a valid temporary function namespace
+ val db = identifier.database.get
+ if (db != "session" && db != CatalogManager.SESSION_NAMESPACE) {
Review Comment:
Fixed.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]