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 2022/03/06 05:36:19 UTC

[GitHub] [spark] yutoacts commented on a change in pull request #35718: [SPARK-38104][SQL] Migrate parsing errors of window into the new error framework

yutoacts commented on a change in pull request #35718:
URL: https://github.com/apache/spark/pull/35718#discussion_r820183126



##########
File path: sql/core/src/test/scala/org/apache/spark/sql/errors/QueryParsingErrorsSuite.scala
##########
@@ -124,4 +124,49 @@ class QueryParsingErrorsSuite extends QueryTest with SharedSparkSession {
           |--------------^^^
           |""".stripMargin)
   }
+
+  test("SPARK:38104: INVALID_SQL_SYNTAX - redefine window") {
+    validateParsingError(
+      sqlText = "SELECT min(a) OVER win FROM t1 WINDOW win AS win, win AS win2",
+      errorClass = "INVALID_SQL_SYNTAX",
+      sqlState = "42000",
+      message =
+        """
+          |Invalid SQL syntax: The definition of window 'win' is repetitive.(line 1, pos 31)
+          |
+          |== SQL ==
+          |SELECT min(a) OVER win FROM t1 WINDOW win AS win, win AS win2
+          |-------------------------------^^^
+          |""".stripMargin)
+  }
+
+  test("SPARK:38104: INVALID_SQL_SYNTAX- invalid window reference") {

Review comment:
       fixed.




-- 
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-unsubscribe@spark.apache.org

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



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