Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/13400#discussion_r65122095
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
---
@@ -1537,6 +1537,35 @@ class SQLQuerySuite extends QueryTest with
SQLTestUtils with TestHiveSingleton {
assert(fs.exists(path), "This is an external table, so the data should
not have been dropped")
}
+ test("select partitioned table") {
+ sql(
+ s"""
+ |CREATE TABLE table_with_partition(c1 string)
+ |PARTITIONED BY (p1 string,p2 string,p3 string,p4 string,p5
string)
--- End diff --
There are multiple related test cases in `InsertIntoHiveTableSuite`. It has
more than one bugs in this statement. For example, below is a common mistake
users might make:
```
hive> CREATE TABLE partitioned (id bigint, data string) PARTITIONED BY
(data string, part string);
FAILED: SemanticException [Error 10035]: Column repeated in partitioning
columns
```
Currently, we return a confusing error message:
```
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.);
```
Try to submit another PR to detect these user errors and output a
understandable error message.
---
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]