You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2022/02/07 01:26:31 UTC

[GitHub] [spark] HyukjinKwon commented on a change in pull request #35391: [SPARK-38098][PYTHON] Add support for ArrayType of nested StructType to arrow-based conversion

HyukjinKwon commented on a change in pull request #35391:
URL: https://github.com/apache/spark/pull/35391#discussion_r800265582



##########
File path: python/pyspark/sql/pandas/types.py
##########
@@ -86,8 +86,13 @@ def to_arrow_type(dt: DataType) -> "pa.DataType":
     elif type(dt) == DayTimeIntervalType:
         arrow_type = pa.duration("us")
     elif type(dt) == ArrayType:
-        if type(dt.elementType) in [StructType, TimestampType]:
+        if type(dt.elementType) == TimestampType:

Review comment:
       My only concern here is that we current convert the struct type as a DataFrame instead a Series of dictionaries (e.g., `returnType=struct<...>`) which is inconsistent with the current conversion this PR proposes (a Series of dictionaries).




-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org