You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@kyuubi.apache.org by "xuefeimiaoao (via GitHub)" <gi...@apache.org> on 2023/02/09 02:35:29 UTC
[GitHub] [kyuubi] xuefeimiaoao commented on a diff in pull request #4246: [KYUUBI #4245][SPARK] Support UserDefinedType for Spark 3.2 and above
xuefeimiaoao commented on code in PR #4246:
URL: https://github.com/apache/kyuubi/pull/4246#discussion_r1100915905
##########
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:
Sure, it's best to do it.
--
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: notifications-unsubscribe@kyuubi.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@kyuubi.apache.org
For additional commands, e-mail: notifications-help@kyuubi.apache.org