You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "ueshin (via GitHub)" <gi...@apache.org> on 2025/03/01 01:38:33 UTC
Re: [PR] [SPARK-44856][PYTHON] Improve Python UDTF arrow serializer performance [spark]
ueshin commented on code in PR #50099:
URL: https://github.com/apache/spark/pull/50099#discussion_r1976207186
##########
python/pyspark/sql/pandas/serializers.py:
##########
@@ -175,6 +178,16 @@ def wrap_and_init_stream():
return super(ArrowStreamUDFSerializer, self).dump_stream(wrap_and_init_stream(), stream)
+class ArrowStreamUDTFSerializer(ArrowStreamUDFSerializer):
+ """
+ Same as :class:`ArrowStreamSerializer` but it flattens the struct to Arrow record batch
+ for applying each function with the raw record arrow batch. See also `DataFrame.mapInArrow`.
+ """
+
+ def load_stream(self, stream):
+ return super(ArrowStreamUDFSerializer, self).load_stream(stream)
Review Comment:
This may be confusing. How about directly call it?
```suggestion
return super(ArrowStreamUDFSerializer, self).load_stream(stream)
return ArrowStreamSerializer.load_stream(self, stream)
```
--
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