Skip to content
Snippets Groups Projects
Commit 6a1b2eb4 authored by Kunal Khamar's avatar Kunal Khamar Committed by Xiao Li
Browse files

[SPARK-20164][SQL] AnalysisException not tolerant of null query plan.


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`.

- Unit test

Author: Kunal Khamar <kkhamar@outlook.com>

Closes #17486 from kunalkhamar/spark-20164.

(cherry picked from commit 254877c2)
Signed-off-by: default avatarXiao Li <gatorsmile@gmail.com>
parent 103ff54d
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment