[ 
https://issues.apache.org/jira/browse/SPARK-61455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Wenchen Fan resolved SPARK-61455.
---------------------------------
    Fix Version/s: 4.4.0
       Resolution: Fixed

Issue resolved by pull request 60340
[https://github.com/apache/spark/pull/60340]

> Python worker drops exception when message contains lone surrogate
> ------------------------------------------------------------------
>
>                 Key: SPARK-61455
>                 URL: https://issues.apache.org/jira/browse/SPARK-61455
>             Project: Spark
>          Issue Type: Improvement
>          Components: PySpark
>    Affects Versions: 4.4.0
>            Reporter: Craiu Constantin-Tiberiu
>            Assignee: Craiu Constantin-Tiberiu
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 4.4.0
>
>
> When Python UDF raises exception which contains a lone surrogate this ends up 
> raising  a {{UnicodeEncodeError}} during propagation, which is only printed 
> to stderr. 
> JVM side reports "Python worker exited unexpectedly (crashed)" instead of the 
> user's error.
>  
> Example:
> ```
> def boom():
>     raise ValueError("bad path: " + b"/data/\xff.csv".decode("utf-8", 
> "surrogateescape"))
> spark.udf.register("boom", boom)
> spark.sql("SELECT boom()").collect()
> ```



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

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

Reply via email to