cloud-fan commented on a change in pull request #30567:
URL: https://github.com/apache/spark/pull/30567#discussion_r534206960
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/execution/SQLViewSuite.scala
##########
@@ -763,6 +764,48 @@ abstract class SQLViewSuite extends QueryTest with
SQLTestUtils {
}
}
+ test("temporary view should ignore useCurrentSQLConfigsForView config") {
+ withTable("t") {
+ Seq(2, 3, 1).toDF("c1").write.format("parquet").saveAsTable("t")
+ withTempView("v1") {
+ sql("CREATE TEMPORARY VIEW v1 AS SELECT 1/0")
+ withSQLConf(
+ USE_CURRENT_SQL_CONFIGS_FOR_VIEW.key -> "true",
+ ANSI_ENABLED.key -> "true") {
+ checkAnswer(sql("SELECT * FROM v1"), Seq(Row(null)))
+ }
+ }
+ }
+ }
+
+ test("alter temporary view should follow current storeAnalyzedPlanForView
config") {
+ withTable("t") {
+ Seq(2, 3, 1).toDF("c1").write.format("parquet").saveAsTable("t")
+ withView("v1") {
+ withSQLConf(STORE_ANALYZED_PLAN_FOR_VIEW.key -> "true") {
+ sql("CREATE TEMPORARY VIEW v1 AS SELECT * FROM t")
Review comment:
let's also test the first created view and make sure it respect
`STORE_ANALYZED_PLAN_FOR_VIEW`
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]