viirya commented on a change in pull request #25570: [SPARK-23519][SQL] create
view should work from query with duplicate output columns
URL: https://github.com/apache/spark/pull/25570#discussion_r317337106
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala
##########
@@ -710,4 +710,10 @@ abstract class SQLViewSuite extends QueryTest with
SQLTestUtils {
}
}
}
+
+ test("SPARK-23519 view should be created even when query output contains
duplicate col name") {
+ sql("CREATE TABLE t23519 AS SELECT 1 AS c1")
Review comment:
`CREATE TABLE t23519 USING parquet AS SELECT 1 AS c1`?
If no `USING parquet`, the exception will be thrown:
```
[info] - SPARK-23519 view should be created even when query output contains
duplicate col name *** FAILED *** (43 milliseconds)
[info] org.apache.spark.sql.AnalysisException: Hive support is required to
CREATE Hive TABLE (AS SELECT);;
[info] 'CreateTable `t23519`,
org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, ErrorIfExists
[info] +- Project [1 AS c1#1058]
[info] +- OneRowRelation
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]