cloud-fan commented on a change in pull request #34254:
URL: https://github.com/apache/spark/pull/34254#discussion_r728786416
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/SQLQuerySuite.scala
##########
@@ -2632,6 +2632,16 @@ abstract class SQLQuerySuiteBase extends QueryTest with
SQLTestUtils with TestHi
}
}
}
+
+ test("SPARK-36905: read hive views without without explicit column names") {
+ withTable("t1") {
+ withView("test_view") {
+ hiveClient.runSqlHive("create table t1 stored as avro as select 2 as
id")
+ hiveClient.runSqlHive("create view test_view as select 1, id + 1
from t1")
+ checkAnswer(sql("select * from test_view"), Seq(Row(1, 3)))
+ }
+ }
Review comment:
```suggestion
withTable("t1") {
withView("test_view") {
hiveClient.runSqlHive("create table t1 stored as avro as select 2 as
id")
hiveClient.runSqlHive("create view test_view as select 1, id + 1
from t1")
checkAnswer(sql("select * from test_view"), Seq(Row(1, 3)))
}
}
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]