Github user marmbrus commented on a diff in the pull request:
https://github.com/apache/spark/pull/6458#discussion_r31395976
--- Diff:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
---
@@ -362,6 +362,29 @@ class SQLQuerySuite extends QueryTest {
}
}
+ test("specifying the column list for CTAS") {
+ Seq((1, "111111"), (2, "222222")).toDF("key",
"value").registerTempTable("mytable1")
+
+ try {
+ sql("create table gen__tmp(a int, b string) as select key, value
from mytable1")
+ checkAnswer(
+ sql("SELECT a, b from gen__tmp"),
+ sql("select key, value from mytable1").collect())
+ } finally {
--- End diff --
If this was normal code I think the `try`/`finally` would be a good idea.
In this case though, I'm not sure its worth the extra code (and not looking
like any of the other tests) to avoid one cascading failure. (we could also
just use unique table names).
---
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]