pan3793 commented on code in PR #50294:
URL: https://github.com/apache/spark/pull/50294#discussion_r1998302542


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -362,17 +363,35 @@ object SQLConf {
         "for using switch statements in InSet must be non-negative and less 
than or equal to 600")
       .createWithDefault(400)
 
+  private val VALIED_LOG_LEVELS: Array[String] = Level.values.map(_.toString)
+
+  private def isValidLogLevel(level: String): Boolean =
+    VALIED_LOG_LEVELS.contains(level.toUpperCase(Locale.ROOT))
+
+  private def toLogLevel(upperCaseValidLevel: String): Level = {
+    require(VALIED_LOG_LEVELS.contains(upperCaseValidLevel))
+    upperCaseValidLevel match {

Review Comment:
   oops, I forget such an emun built-in method, inlined.



##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -362,17 +363,35 @@ object SQLConf {
         "for using switch statements in InSet must be non-negative and less 
than or equal to 600")
       .createWithDefault(400)
 
+  private val VALIED_LOG_LEVELS: Array[String] = Level.values.map(_.toString)

Review Comment:
   fixed



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to