diff options
author | bomeng <bmeng@us.ibm.com> | 2016-04-12 13:43:39 -0700 |
---|---|---|
committer | Reynold Xin <rxin@databricks.com> | 2016-04-12 13:43:39 -0700 |
commit | bcd2076274b1a95f74616d0ceacb0696e38b5f4c (patch) | |
tree | caefc19411872ab1a6106cd7c75994a26f4259e4 /sql/core/src | |
parent | 85e68b4bea3e4ad2e4063334dbf5b11af197d2ce (diff) | |
download | spark-bcd2076274b1a95f74616d0ceacb0696e38b5f4c.tar.gz spark-bcd2076274b1a95f74616d0ceacb0696e38b5f4c.tar.bz2 spark-bcd2076274b1a95f74616d0ceacb0696e38b5f4c.zip |
[SPARK-14414][SQL] improve the error message class hierarchy
## What changes were proposed in this pull request?
Before we are using `AnalysisException`, `ParseException`, `NoSuchFunctionException` etc when a parsing error encounters. I am trying to make it consistent and also **minimum** code impact to the current implementation by changing the class hierarchy.
1. `NoSuchItemException` is removed, since it is an abstract class and it just simply takes a message string.
2. `NoSuchDatabaseException`, `NoSuchTableException`, `NoSuchPartitionException` and `NoSuchFunctionException` now extends `AnalysisException`, as well as `ParseException`, they are all under `AnalysisException` umbrella, but you can also determine how to use them in a granular way.
## How was this patch tested?
The existing test cases should cover this patch.
Author: bomeng <bmeng@us.ibm.com>
Closes #12314 from bomeng/SPARK-14414.
Diffstat (limited to 'sql/core/src')
-rw-r--r-- | sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala b/sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala index 758a7e45d2..5137bd11d8 100644 --- a/sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala +++ b/sql/core/src/main/scala/org/apache/spark/sql/execution/command/ddl.scala @@ -29,6 +29,7 @@ import org.apache.spark.sql.catalyst.expressions.{Attribute, AttributeReference} import org.apache.spark.sql.types._ + // Note: The definition of these commands are based on the ones described in // https://cwiki.apache.org/confluence/display/Hive/LanguageManual+DDL |