GitHub user gatorsmile opened a pull request:
https://github.com/apache/spark/pull/13415
[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`
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/gatorsmile/spark partitionColumnsInTableSchema
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/spark/pull/13415.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #13415
----
commit 48ddb08580eb47407e087c5640cddf322f53b276
Author: gatorsmile <[email protected]>
Date: 2016-05-31T18:06:21Z
fix
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]