ueshin commented on code in PR #52289:
URL: https://github.com/apache/spark/pull/52289#discussion_r2334443120


##########
python/pyspark/sql/pandas/serializers.py:
##########
@@ -283,7 +283,7 @@ def apply_type_coercion():
                         coerced_array = self._create_array(original_array, 
field.type)
                         coerced_arrays.append(coerced_array)
                     coerced_batch = pa.RecordBatch.from_arrays(
-                        coerced_arrays, names=arrow_return_type.names
+                        coerced_arrays, names=[field.name for field in 
arrow_return_type]

Review Comment:
   nit: Shall we use `expected_field_names`? It's already calculated.



-- 
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-unsubscr...@spark.apache.org

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


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

Reply via email to