GitHub user davies opened a pull request:
https://github.com/apache/spark/pull/14722
[SPARK-13286] [SQL] add the next expression of SQLException as cause
## What changes were proposed in this pull request?
Some JDBC driver (for example PostgreSQL) does not use the underlying
exception as cause, but have another APIs (getNextException) to access that, so
it it's included in the error logging, making us hard to find the root cause,
especially in batch mode.
This PR will pull out the next exception and add it as cause (if it's
different) or suppressed (if there is another different cause).
## How was this patch tested?
Can't reproduce this on the default JDBC driver, so did not add a
regression test.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/davies/spark keep_cause
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/14722.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #14722
----
commit 51fbf25a2ba5dc8c293f153b772e55050772c1f1
Author: Davies Liu <[email protected]>
Date: 2016-08-19T20:20:47Z
add the next expression as cause
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]