sunchao commented on a change in pull request #31203:
URL: https://github.com/apache/spark/pull/31203#discussion_r564846990
##########
File path: core/src/main/scala/org/apache/spark/util/VersionUtils.scala
##########
@@ -63,4 +64,36 @@ private[spark] object VersionUtils {
s" version string, but it could not find the major and minor version
numbers.")
}
}
+
+ /**
+ * Extracts the major, minor and patch parts from the input `version`. Note
that if minor or patch
+ * version is missing from the input, this will return 0 for these parts.
Returns `None` if the
+ * input is not of a valid format.
+ *
+ * Examples of valid version:
+ * - 1 (extracts to (1, 0, 0))
+ * - 2.4 (extracts to (2, 4, 0))
+ * - 3.2.2 (extracts to (3, 2, 2))
+ * - 3.2.2.4 (extracts to 3, 2, 2))
+ * - 3.3.1-SNAPSHOT (extracts to (3, 2, 2))
Review comment:
I updated it to `* - 3.3.1-SNAPSHOT (extracts to (3, 3, 1))`
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]