sandeep-katta commented on a change in pull request #25452: [SPARK-28710][SQL]to fix replace function, spark should call drop and create function URL: https://github.com/apache/spark/pull/25452#discussion_r358596666
########## File path: sql/hive/src/main/scala/org/apache/spark/sql/hive/HiveExternalCatalog.scala ########## @@ -1309,6 +1318,15 @@ private[spark] class HiveExternalCatalog(conf: SparkConf, hadoopConf: Configurat client.listFunctions(db, pattern) } + def isResourceChanged(db: String, newFunction: CatalogFunction): Boolean = { + val oldFunction = getFunction(db, newFunction.identifier.funcName) + if (oldFunction.resources.size != newFunction.resources.size) { + return true + } + val changedResources = newFunction.resources.filter( + newResource => !oldFunction.resources.contains(newResource)) Review comment: I think it should be case sensitive, cz in case of unix based system /opt/some.jar is different from /OPT/SOME.jar. Isn't it ? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org