File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
sql/core/src/test/scala/org/apache/spark/sql Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -422,10 +422,6 @@ class SQLQuerySuite extends QueryTest with BeforeAndAfterAll {
422422 sql(" with q1 as (select * from testData limit 10) select * from q1" ),
423423 testData.take(10 ).toSeq)
424424
425- intercept[RuntimeException ] {
426- sql(" with q1 as (select * from testData) with q2 as (select * from q1) select * from q2" )
427- }
428-
429425 checkAnswer(
430426 sql("""
431427 |with q1 as (select * from testData where key= '5'),
@@ -435,6 +431,12 @@ class SQLQuerySuite extends QueryTest with BeforeAndAfterAll {
435431
436432 }
437433
434+ test(" Allow only a single WITH clause per query" ) {
435+ intercept[RuntimeException ] {
436+ sql(" with q1 as (select * from testData) with q2 as (select * from q1) select * from q2" )
437+ }
438+ }
439+
438440 test(" date row" ) {
439441 checkAnswer(sql(
440442 """ select cast("2015-01-28" as date) from testData limit 1""" ),
You can’t perform that action at this time.
0 commit comments