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 2020/05/18 11:51:03 UTC
[GitHub] [spark] cfmcgrady commented on a change in pull request #23900: [SPARK-23836][PYTHON] Add support for StructType return in Scalar Pandas UDF
cfmcgrady commented on a change in pull request #23900:
URL: https://github.com/apache/spark/pull/23900#discussion_r426568363
##########
File path: python/pyspark/sql/types.py
##########
@@ -1616,6 +1616,12 @@ def to_arrow_type(dt):
if type(dt.elementType) == TimestampType:
raise TypeError("Unsupported type in conversion to Arrow: " + str(dt))
arrow_type = pa.list_(to_arrow_type(dt.elementType))
+ elif type(dt) == StructType:
+ if any(type(field.dataType) == StructType for field in dt):
+ raise TypeError("Nested StructType not supported in conversion to Arrow")
Review comment:
I am curious why `ArrayType(elementType = StructType)` support was removed from here? @BryanCutler
----------------------------------------------------------------
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:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org