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:
@MaxGekk thanks for the review. 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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]