Yicong-Huang commented on code in PR #55532:
URL: https://github.com/apache/spark/pull/55532#discussion_r3157515804


##########
python/pyspark/worker.py:
##########
@@ -2926,7 +2926,8 @@ def grouped_func(
 
                 # Verify, reorder, and wrap each output batch
                 for batch in result:
-                    verify_arrow_batch(
+                    verify_return_type(batch, pa.RecordBatch)

Review Comment:
   Fixed in 6f2967b — grouped-map iter now wraps with 
`verify_return_type(result, Iterator[pa.RecordBatch])`, matching mapInArrow. 
Error message changes from per-element to iterator form; regex in 
`test_apply_in_arrow_not_returning_arrow_table` updated in 52e8935.



##########
python/pyspark/worker.py:
##########
@@ -2561,8 +2558,8 @@ def func(split_index: int, data: 
Iterator[pa.RecordBatch]) -> Iterator[pa.Record
             output_batches = udf_func(input_batches)
 
             # Post-processing
-            verified: Iterator[pa.RecordBatch] = 
verify_result(pa.RecordBatch)(output_batches)
-            yield from map(ArrowBatchTransformer.wrap_struct, verified)
+            verified_iter = verify_return_type(output_batches, 
Iterator[pa.RecordBatch])

Review Comment:
   Added a `list_not_iter` case to `test_other_than_recordbatch_iter` in 
6f2967b — pins the new "is list" rejection.



-- 
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