bowenliang123 commented on code in PR #4246:
URL: https://github.com/apache/kyuubi/pull/4246#discussion_r1096548601


##########
externals/kyuubi-spark-sql-engine/src/main/scala/org/apache/kyuubi/engine/spark/schema/SchemaHelper.scala:
##########
@@ -41,6 +41,24 @@ object SchemaHelper {
    */
   final val YEAR_MONTH_INTERVAL = "YearMonthIntervalType"
 
+  /**
+   * Spark 3.2.0 DataType UserDefinedType's class name.
+   * And UDT API has been public since Spark 3.2.0.
+   * Return true if dt is subClass of UserDefinedType, which has been set to 
public
+   * since Spark 3.2.0
+   */
+  final private val isUserDefinedType = (dt: DataType) => {
+    val dataType = "DataType"
+    val userDefinedType = "UserDefinedType"

Review Comment:
   Comparing the simple class name of the class could be danger if `DataType`  
IS somehow used as in user's defined type. 
   It would be better to use the class name. `org.apache.spark.sql.types` 
`org.apache.spark.sql.types.UserDefinedType`



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