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 2021/12/14 05:28:17 UTC
[GitHub] [spark] BryanCutler commented on a change in pull request #34509: [SPARK-34521][PYTHON][SQL] Fix spark.createDataFrame when using pandas with StringDtype
BryanCutler commented on a change in pull request #34509:
URL: https://github.com/apache/spark/pull/34509#discussion_r768326659
##########
File path: python/pyspark/sql/pandas/serializers.py
##########
@@ -215,7 +215,10 @@ def _create_batch(self, series):
series = ((s, None) if not isinstance(s, (list, tuple)) else s for s in series)
def create_array(s, t):
- mask = s.isnull()
+ if hasattr(s.values, "__arrow_array__"):
Review comment:
I think it's preferred to use `s.array` instead of `s.values`, would you mind giving that a try?
--
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