EnricoMi commented on code in PR #38223:
URL: https://github.com/apache/spark/pull/38223#discussion_r1001556844


##########
python/pyspark/sql/pandas/serializers.py:
##########
@@ -216,7 +216,7 @@ def _create_batch(self, series):
             series = [series]
         series = ((s, None) if not isinstance(s, (list, tuple)) else s for s 
in series)
 
-        def create_array(s, t):
+        def create_array(s, t, n):

Review Comment:
   I know, this parameter is ugly as it is only used for the exception, but 
`s.name` is `1` instead of `mean` (test 
`test_apply_in_pandas_returning_incompatible_type`) when I apply this change.
   
   Looks like `s[field.name]` and `s[s.columns[i]]` returns a `Series` that 
thinks it's name is `1`. Sad.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to