diff options
author | Michael Armbrust <michael@databricks.com> | 2015-02-10 17:32:42 -0800 |
---|---|---|
committer | Michael Armbrust <michael@databricks.com> | 2015-02-10 17:32:42 -0800 |
commit | 6195e2473b98253ccc9edc3d624ba2bf59ffc398 (patch) | |
tree | 33afc671375362f703028c8c96521198cb57cc17 /sql/core | |
parent | aaf50d05c7616e4f8f16654b642500ae06cdd774 (diff) | |
download | spark-6195e2473b98253ccc9edc3d624ba2bf59ffc398.tar.gz spark-6195e2473b98253ccc9edc3d624ba2bf59ffc398.tar.bz2 spark-6195e2473b98253ccc9edc3d624ba2bf59ffc398.zip |
[SQL] Add an exception for analysis errors.
Also start from the bottom so we show the first error instead of the top error.
Author: Michael Armbrust <michael@databricks.com>
Closes #4439 from marmbrus/analysisException and squashes the following commits:
45862a0 [Michael Armbrust] fix hive test
a773bba [Michael Armbrust] Merge remote-tracking branch 'origin/master' into analysisException
f88079f [Michael Armbrust] update more cases
fede90a [Michael Armbrust] newline
fbf4bc3 [Michael Armbrust] move to sql
6235db4 [Michael Armbrust] [SQL] Add an exception for analysis errors.
Diffstat (limited to 'sql/core')
-rw-r--r-- | sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala b/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala index 11502edf97..55fd0b0892 100644 --- a/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala +++ b/sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala @@ -589,7 +589,7 @@ class SQLQuerySuite extends QueryTest with BeforeAndAfterAll { ("1" :: "2" :: "3" :: "4" :: "A" :: "B" :: "C" :: "D" :: "E" :: "F" :: Nil).map(Row(_))) // Column type mismatches where a coercion is not possible, in this case between integer // and array types, trigger a TreeNodeException. - intercept[TreeNodeException[_]] { + intercept[AnalysisException] { sql("SELECT data FROM arrayData UNION SELECT 1 FROM arrayData").collect() } } |