bowenliang123 commented on code in PR #4168: URL: https://github.com/apache/kyuubi/pull/4168#discussion_r1073331495
########## extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/functionTypeExtractors.scala: ########## @@ -33,6 +36,18 @@ object FunctionTypeExtractor { val functionTypeExtractors: Map[String, FunctionTypeExtractor] = { loadExtractorsToMap[FunctionTypeExtractor] } + + def getFunctionType(fi: FunctionIdentifier, catalog: SessionCatalog): FunctionType = { + if (catalog.isTemporaryFunction(fi)) { + TEMP + } else if (catalog.isPersistentFunction(fi)) { + PERMANENT + } else if (catalog.isRegisteredFunction(fi)) { + SYSTEM + } else { + TEMP Review Comment: For repeated TEMP in branches, consider use match-case to generify them. -- 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: notifications-unsubscr...@kyuubi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@kyuubi.apache.org For additional commands, e-mail: notifications-h...@kyuubi.apache.org