You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "bowenliang123 (via GitHub)" <gi...@apache.org> on 2023/08/07 00:42:19 UTC
[GitHub] [kyuubi] bowenliang123 commented on a diff in pull request #5055: [Authz] Support building function privileges in Spark 3.4
bowenliang123 commented on code in PR #5055:
URL: https://github.com/apache/kyuubi/pull/5055#discussion_r1285288980
##########
extensions/spark/kyuubi-spark-authz/src/main/scala/org/apache/kyuubi/plugin/spark/authz/serde/functionExtractors.scala:
##########
@@ -29,13 +30,17 @@ object FunctionExtractor {
loadExtractorsToMap[FunctionExtractor]
}
- def buildFunctionIdentFromQualifiedName(qualifiedName: String): (String, Option[String]) = {
- val parts: Array[String] = qualifiedName.split("\\.", 2)
- if (parts.length == 1) {
- (qualifiedName, None)
+ private[authz] def buildFunctionFromQualifiedName(qualifiedName: String): Function = {
+ val partsLen = if (isSparkV34OrGreater) 3 else 2
+ val parts: Array[String] = qualifiedName.split("\\.", partsLen)
Review Comment:
What's the reason for setting the limit for splitting?
Even if the version affects the split array length, we could just fetch them by corresponding index.
--
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-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org