viirya 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_r358332399
 
 

 ##########
 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:
   Will case sensitivity be problem in this comparison? Shall we lower case 
before comparison?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to