[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 e69466056f
(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 <gurwls223@apache.org>
Signed-off-by: HyukjinKwon <gurwls223@apache.org>
This commit is contained in:
parent
632b5bce23
commit
53ce58da34
|
@ -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'))
|
||||
|
|
Loading…
Reference in a new issue