wForget commented on code in PR #3227:
URL: https://github.com/apache/incubator-kyuubi/pull/3227#discussion_r945402226


##########
extensions/spark/kyuubi-spark-connector-common/src/main/scala/org/apache/kyuubi/spark/connector/common/SparkConfParser.scala:
##########
@@ -59,11 +61,19 @@ case class SparkConfParser(
     override protected def conversion(value: String): String = value
   }
 
+  class BytesConfParser extends ConfParser[Long] {
+    override protected def conversion(value: String): Long = 
JavaUtils.byteStringAsBytes(value)
+  }
+
+  class TimeConfParser extends ConfParser[Long] {
+    override protected def conversion(value: String): Long = 
JavaUtils.timeStringAsMs(value)
+  }
+
   abstract class ConfParser[T]() {
     private var optionName: Option[String] = None
     private var sessionConfName: Option[String] = None
     private var tablePropertyName: Option[String] = None
-    private var defaultValue: Option[T] = None
+    private var defaultValue: Option[String] = None

Review Comment:
   Do we need to add another method for the default value of type string?
   like spark:
   
![3d06f5d6a8a08d05c612d30316eeddc](https://user-images.githubusercontent.com/17894939/184571502-beb854f1-e653-417f-855e-9fd336effbf5.jpg)
   



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

Reply via email to