sadhen commented on a change in pull request #31735:
URL: https://github.com/apache/spark/pull/31735#discussion_r595695013



##########
File path: python/pyspark/sql/pandas/types.py
##########
@@ -74,6 +74,8 @@ def to_arrow_type(dt):
         arrow_type = pa.struct(fields)
     elif type(dt) == NullType:
         arrow_type = pa.null()
+    elif isinstance(dt, UserDefinedType):
+        arrow_type = to_arrow_type(dt.sqlType())

Review comment:
       Additional info:
   
   SparkConversionMixin.createDataFrame -> to_arrow_type
   PandasConversionMixin.toPandas -> to_arrow_schema -> to_arrow_type
   
   we will add unit tests on it. (P.S. I'm co-working to eddyxu.)




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

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