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 2020/11/27 08:55:45 UTC

[GitHub] [spark] beliefer commented on a change in pull request #30512: [SPARK-28645][SQL] ParseException is thrown when the window is redefined

beliefer commented on a change in pull request #30512:
URL: https://github.com/apache/spark/pull/30512#discussion_r531462006



##########
File path: sql/core/src/test/resources/sql-tests/inputs/window.sql
##########
@@ -250,4 +250,16 @@ WINDOW w AS (
   ORDER BY salary DESC
   RANGE BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
 )
-ORDER BY department;
\ No newline at end of file
+ORDER BY department;
+
+SELECT
+    employee_name,
+    salary,
+    first_value(employee_name) OVER w highest_salary,
+    nth_value(employee_name, 2) OVER w second_highest_salary
+FROM
+    basic_pays
+WINDOW
+    w AS (ORDER BY salary DESC ROWS BETWEEN UNBOUNDED PRECEDING AND 1 FOLLOWING),

Review comment:
       I checked the PgSQL and find the alias of window frame is case insensitive.
   




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



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