You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by gu...@apache.org on 2020/06/09 01:29:57 UTC
[spark] branch branch-3.0 updated:
[SPARK-31849][PYTHON][SQL][FOLLOW-UP] More correct error message in Python
UDF exception message
This is an automated email from the ASF dual-hosted git repository.
gurwls223 pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/spark.git
The following commit(s) were added to refs/heads/branch-3.0 by this push:
new 614659b [SPARK-31849][PYTHON][SQL][FOLLOW-UP] More correct error message in Python UDF exception message
614659b is described below
commit 614659b270938c95bba7d3d956c0a1ac3ec5f469
Author: HyukjinKwon <gu...@apache.org>
AuthorDate: Tue Jun 9 10:24:34 2020 +0900
[SPARK-31849][PYTHON][SQL][FOLLOW-UP] More correct error message in Python UDF exception message
### What changes were proposed in this pull request?
This PR proposes to fix wordings in the Python UDF exception error message from:
From:
> An exception was thrown from Python worker in the executor. The below is the Python worker stacktrace.
To:
> An exception was thrown from the Python worker. Please see the stack trace below.
It removes "executor" because Python worker is technically a separate process, and remove the duplicated wording "Python worker" .
### Why are the changes needed?
To give users better exception messages.
### Does this PR introduce _any_ user-facing change?
No, it's in unreleased branches only. If RC3 passes, yes, it will change the exception message.
### How was this patch tested?
Manually tested.
Closes #28762 from HyukjinKwon/SPARK-31849-followup-2.
Authored-by: HyukjinKwon <gu...@apache.org>
Signed-off-by: HyukjinKwon <gu...@apache.org>
(cherry picked from commit e28914095aa1fa7a4680b5e4fcf69e3ef64b3dbc)
Signed-off-by: HyukjinKwon <gu...@apache.org>
---
python/pyspark/sql/utils.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/python/pyspark/sql/utils.py b/python/pyspark/sql/utils.py
index 1dbea12..1d5bc49 100644
--- a/python/pyspark/sql/utils.py
+++ b/python/pyspark/sql/utils.py
@@ -116,8 +116,8 @@ def convert_exception(e):
# To make sure this only catches Python UDFs.
and any(map(lambda v: "org.apache.spark.sql.execution.python" in v.toString(),
c.getStackTrace()))):
- msg = ("\n An exception was thrown from Python worker in the executor. "
- "The below is the Python worker stacktrace.\n%s" % c.getMessage())
+ msg = ("\n An exception was thrown from the Python worker. "
+ "Please see the stack trace below.\n%s" % c.getMessage())
return PythonException(msg, stacktrace)
return UnknownException(s, stacktrace, c)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org