1. [SPARK-24246][SQL] Improve AnalysisException by setting the cause when (details)
Commit 2f60df09dc1bb65da254e00abe8463122e8c77cf by gatorsmile
[SPARK-24246][SQL] Improve AnalysisException by setting the cause when
it's available
## What changes were proposed in this pull request?
If there is an exception, it's better to set it as the cause of
AnalysisException since the exception may contain useful debug
## How was this patch tested?
Author: Shixiong Zhu <>
Closes #21297 from zsxwing/SPARK-24246.
(cherry picked from commit c26f673252c2cbbccf8c395ba6d4ab80c098d60e)
Signed-off-by: gatorsmile <>
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/ResolveInlineTables.scala (diff)
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/Analyzer.scala (diff)
The file was modifiedsql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/analysis/package.scala (diff)
The file was modifiedsql/core/src/main/scala/org/apache/spark/sql/execution/datasources/rules.scala (diff)