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 706dbec [MINOR][PYTHON] Add one more newline between JVM and Python
tracebacks
706dbec is described below
commit 706dbecb356d241d9dd3e2f1ff060502a3cdcb23
Author: HyukjinKwon <[email protected]>
AuthorDate: Fri Jun 5 13:31:35 2020 +0900
[MINOR][PYTHON] Add one more newline between JVM and Python tracebacks
### What changes were proposed in this pull request?
This PR proposes to add one more newline to clearly separate JVM and Python
tracebacks:
Before:
```
Traceback (most recent call last):
...
pyspark.sql.utils.AnalysisException: Reference 'column' is ambiguous, could
be: column, column.;
JVM stacktrace:
org.apache.spark.sql.AnalysisException: Reference 'column' is ambiguous,
could be: column, column.;
...
```
After:
```
Traceback (most recent call last):
...
pyspark.sql.utils.AnalysisException: Reference 'column' is ambiguous, could
be: column, column.;
JVM stacktrace:
org.apache.spark.sql.AnalysisException: Reference 'column' is ambiguous,
could be: column, column.;
...
```
This is kind of a followup of
https://github.com/apache/spark/commit/e69466056fb2c121b7bbb6ad082f09deb1c41063
(SPARK-31849).
### Why are the changes needed?
To make it easier to read.
### Does this PR introduce _any_ user-facing change?
It's in the unreleased branches.
### How was this patch tested?
Manually tested.
Closes #28732 from HyukjinKwon/python-minor.
Authored-by: HyukjinKwon <[email protected]>
Signed-off-by: HyukjinKwon <[email protected]>
(cherry picked from commit 53ce58da3419223ce2666ba4d77aa4f2db82bdb5)
Signed-off-by: HyukjinKwon <[email protected]>
---
python/pyspark/sql/utils.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/python/pyspark/sql/utils.py b/python/pyspark/sql/utils.py
index 27adc23..3fd7047 100644
--- a/python/pyspark/sql/utils.py
+++ b/python/pyspark/sql/utils.py
@@ -44,7 +44,7 @@ class CapturedException(Exception):
debug_enabled = sql_conf.pysparkJVMStacktraceEnabled()
desc = self.desc
if debug_enabled:
- desc = desc + "\nJVM stacktrace:\n%s" % self.stackTrace
+ desc = desc + "\n\nJVM stacktrace:\n%s" % self.stackTrace
# encode unicode instance for python2 for human readable description
if sys.version_info.major < 3 and isinstance(desc, unicode):
return str(desc.encode('utf-8'))
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]