vladimirg-db commented on code in PR #49835:
URL: https://github.com/apache/spark/pull/49835#discussion_r1946525392


##########
sql/core/src/test/resources/sql-tests/inputs/view-correctness.sql:
##########
@@ -0,0 +1,421 @@
+-- This test suite checks the correctness of queries over views
+
+-- SPARK-51113, UNION
+
+CREATE TEMPORARY VIEW v1 AS
+  SELECT 1 AS num
+  UNION

Review Comment:
   You cannot create a view like that: `CREATE VIEW .... SELECT 1 name 
invalid`, because `CREATE VIEW` is parsed using `parsePlan`. It's only when you 
read a view you'll use `parseQuery`.
   
   Hence, the problem only manifests with correct SQL texts on read - you'll 
just get a correctness issue sometimes.



-- 
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: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to