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