zhengruifeng commented on code in PR #39835:
URL: https://github.com/apache/spark/pull/39835#discussion_r1092840612
##########
connector/connect/server/src/main/scala/org/apache/spark/sql/connect/planner/DataTypeProtoConverter.scala:
##########
@@ -114,6 +118,31 @@ object DataTypeProtoConverter {
MapType(toCatalystType(t.getKeyType), toCatalystType(t.getValueType),
t.getValueContainsNull)
}
+ private def toCatalystUDT(t: proto.DataType.UDT): UserDefinedType[_] = {
+ if (t.getType != "udf") {
Review Comment:
yes, right now this field in all UDTs is `udt`.
but this field is only used in JSON, maybe able to git rid of it.
https://github.com/apache/spark/blob/1a42aa5bd44e7524bb55463bbd85bea782715834/sql/catalyst/src/main/scala/org/apache/spark/sql/types/UserDefinedType.scala#L61-L66
https://github.com/apache/spark/blob/1a42aa5bd44e7524bb55463bbd85bea782715834/sql/catalyst/src/main/scala/org/apache/spark/sql/types/UserDefinedType.scala#L127-L132
https://github.com/apache/spark/blob/1a42aa5bd44e7524bb55463bbd85bea782715834/python/pyspark/sql/types.py#L731-L749
--
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]