dongjoon-hyun commented on a change in pull request #24949: 
[SPARK-28002][SQL][FOLLOWUP] Add more WITH test cases
URL: https://github.com/apache/spark/pull/24949#discussion_r300581113
 
 

 ##########
 File path: sql/core/src/test/resources/sql-tests/results/cte.sql.out
 ##########
 @@ -98,16 +98,70 @@ struct<x:int>
 
 
 -- !query 8
-DROP VIEW IF EXISTS t
+WITH t(x, y) AS (SELECT 1, 2)
+SELECT * FROM t WHERE x = 1 AND y = 2
 -- !query 8 schema
-struct<>
+struct<x:int,y:int>
 -- !query 8 output
-
+1      2
 
 
 -- !query 9
-DROP VIEW IF EXISTS t2
+WITH t(x, x) AS (SELECT 1, 2)
+SELECT * FROM t
 -- !query 9 schema
-struct<>
+struct<x:int,x:int>
 -- !query 9 output
+1      2
+
+
+-- !query 10
+WITH t() AS (SELECT 1)
+SELECT * FROM t
+-- !query 10 schema
+struct<>
+-- !query 10 output
+org.apache.spark.sql.catalyst.parser.ParseException
+
+no viable alternative at input 'WITH t()'(line 1, pos 7)
 
 Review comment:
   Do you think we can have a more meaningful message?

----------------------------------------------------------------
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]

Reply via email to