You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/20 13:01:52 UTC

[GitHub] [spark] dilipbiswal commented on a change in pull request #24150: [SPARK-27209][SQL] Split parsing of SELECT and INSERT into two top-level rules in the grammar file.

dilipbiswal commented on a change in pull request #24150: [SPARK-27209][SQL] Split parsing of SELECT and INSERT into two top-level rules in the grammar file.
URL: https://github.com/apache/spark/pull/24150#discussion_r267325304
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/parser/PlanParserSuite.scala
 ##########
 @@ -754,4 +754,29 @@ class PlanParserSuite extends AnalysisTest {
       assertEqual(query2, Distinct(a.union(b)).except(c.intersect(d, isAll = true), isAll = true))
     }
   }
+
+  test("create/alter view as insert into table") {
+    intercept[ParseException](parsePlan("CREATE VIEW testView AS INSERT INTO jt VALUES(1, 1)"))
+    val sql1 =
+      """
+        |CREATE VIEW testView AS FROM jt
+        |INSERT INTO tbl1 SELECT * WHERE jt.id < 5 " +
 
 Review comment:
   @cloud-fan oops.. will fix.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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