dtenedor commented on code in PR #43682:
URL: https://github.com/apache/spark/pull/43682#discussion_r1385390475


##########
python/pyspark/worker.py:
##########
@@ -1057,6 +1059,9 @@ def mapper(_, it):
                     yield from eval(*[a[o] for o in args_kwargs_offsets])
                 if terminate is not None:
                     yield from terminate()
+            except StopIteration:
+                if terminate is not None:
+                    yield from terminate()

Review Comment:
   I tried this, but then we lose the UDTF method name (i.e. `eval` or 
`terminate`) in the error message. It seems better to keep that. I will leave 
this alone for now, let me know if you would prefer to continue with this 
change anyway and lose this information in the error message and we can proceed 
with that.



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