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


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/parser/AbstractSqlParser.scala:
##########
@@ -72,9 +72,9 @@ abstract class AbstractSqlParser extends AbstractParser with 
ParserInterface {
   /** Creates LogicalPlan for a given SQL string of query. */
   override def parseQuery(sqlText: String): LogicalPlan =
     parse(sqlText) { parser =>
-      val ctx = parser.query()
+      val ctx = parser.singleQuery()

Review Comment:
   So I tried different potentially affected queries including your example, 
they are fine:
   
![image](https://github.com/user-attachments/assets/71ce60a0-056f-4c38-a6c1-455817feeca5)
   
   What's a bit more concerning is that there are "garbage" cases:
   
![image](https://github.com/user-attachments/assets/2a037b98-d6d8-4d70-afde-16f624216989)
   
   You cannot create a garbage view like that, but you can write a garbage 
`EXECUTE IMMEDIATE ... INTO` body:
   
![image](https://github.com/user-attachments/assets/01f4de62-5223-469a-9993-6a2eac364570)
   



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