advancedxy commented on a change in pull request #25847: [SPARK-21045][PYTHON] 
Allow non-ascii string as an exception message in Python 2
URL: https://github.com/apache/spark/pull/25847#discussion_r326054644
 
 

 ##########
 File path: python/pyspark/tests/test_worker.py
 ##########
 @@ -150,6 +151,28 @@ def test_with_different_versions_of_python(self):
         finally:
             self.sc.pythonVer = version
 
+    def test_python_exception_non_hanging(self):
+        """
+        SPARK-21045: exceptions with no ascii encoding shall not hanging 
PySpark.
+        """
+        def f():
+            raise Exception("exception with δΈ­ and \xd6\xd0")
+
+        def run():
+            self.sc.parallelize([1]).map(lambda x: f()).count()
 
 Review comment:
   After the patch to worker, we may simply run this code in the main thread. 
But it will hanging 
   forever without the patch. 
   
   I am prefer this way to indicate that we actually fix the hanging. 

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

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

Reply via email to