diff options
author | Kunal Khamar <kkhamar@outlook.com> | 2017-03-31 09:17:22 -0700 |
---|---|---|
committer | Xiao Li <gatorsmile@gmail.com> | 2017-03-31 09:17:22 -0700 |
commit | 254877c2f04414c70d92fa0a00c0ecee1d73aba7 (patch) | |
tree | 1f686f1872559eb077ad4bd40c245a586e6789e6 /core | |
parent | a8a765b3f302c078cb9519c4a17912cd38b9680c (diff) | |
download | spark-254877c2f04414c70d92fa0a00c0ecee1d73aba7.tar.gz spark-254877c2f04414c70d92fa0a00c0ecee1d73aba7.tar.bz2 spark-254877c2f04414c70d92fa0a00c0ecee1d73aba7.zip |
[SPARK-20164][SQL] AnalysisException not tolerant of null query plan.
## What changes were proposed in this pull request?
The query plan in an `AnalysisException` may be `null` when an `AnalysisException` object is serialized and then deserialized, since `plan` is marked `transient`. Or when someone throws an `AnalysisException` with a null query plan (which should not happen).
`def getMessage` is not tolerant of this and throws a `NullPointerException`, leading to loss of information about the original exception.
The fix is to add a `null` check in `getMessage`.
## How was this patch tested?
- Unit test
Author: Kunal Khamar <kkhamar@outlook.com>
Closes #17486 from kunalkhamar/spark-20164.
Diffstat (limited to 'core')
0 files changed, 0 insertions, 0 deletions