cloud-fan commented on code in PR #40989:
URL: https://github.com/apache/spark/pull/40989#discussion_r1184664266
##########
sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala:
##########
@@ -375,6 +390,8 @@ class SQLQueryTestSuite extends QueryTest with
SharedSparkSession with SQLHelper
val queries = tempQueries.map(_.trim).filter(_ != "").toSeq
// Fix misplacement when comment is at the end of the query.
.map(_.split("\n").filterNot(_.startsWith("--")).mkString("\n")).map(_.trim).filter(_
!= "")
+ // Expand the queries if it's CTETest
+ .flatMap(query => expandCTEQuery(query, testCase))
Review Comment:
The problem of this approach is that we need to manually check the golden
file and make sure the CTE query results are same with or without temp views.
Can we update `runQueries` instead? if the test is `CTETest`, we run the
non-command query with temp view again and check if the result is the same as
without temp view:
https://github.com/apache/spark/blob/master/sql/core/src/test/scala/org/apache/spark/sql/SQLQueryTestSuite.scala#L471-L478
--
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]