diff options
author | gatorsmile <gatorsmile@gmail.com> | 2016-06-13 13:22:46 -0700 |
---|---|---|
committer | Yin Huai <yhuai@databricks.com> | 2016-06-13 13:22:46 -0700 |
commit | 3b7fb84cf88bcae56713fd56396db537fa18f2e5 (patch) | |
tree | cac22b65ce993a8b44731a9c9e852292b1b9dc14 /sql/catalyst | |
parent | a6a18a4573515e76d78534f1a19fcc2c3819f6c5 (diff) | |
download | spark-3b7fb84cf88bcae56713fd56396db537fa18f2e5.tar.gz spark-3b7fb84cf88bcae56713fd56396db537fa18f2e5.tar.bz2 spark-3b7fb84cf88bcae56713fd56396db537fa18f2e5.zip |
[SPARK-15676][SQL] Disallow Column Names as Partition Columns For Hive Tables
#### What changes were proposed in this pull request?
When creating a Hive Table (not data source tables), a common error users might make is to specify an existing column name as a partition column. Below is what Hive returns in this case:
```
hive> CREATE TABLE partitioned (id bigint, data string) PARTITIONED BY (data string, part string);
FAILED: SemanticException [Error 10035]: Column repeated in partitioning columns
```
Currently, the error we issued is very confusing:
```
org.apache.spark.sql.AnalysisException: org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:For direct MetaStore DB connections, we don't support retries at the client level.);
```
This PR is to fix the above issue by capturing the usage error in `Parser`.
#### How was this patch tested?
Added a test case to `DDLCommandSuite`
Author: gatorsmile <gatorsmile@gmail.com>
Closes #13415 from gatorsmile/partitionColumnsInTableSchema.
Diffstat (limited to 'sql/catalyst')
0 files changed, 0 insertions, 0 deletions