Details
-
Sub-task
-
Status: In Progress
-
Major
-
Resolution: Unresolved
-
3.1.0
-
None
-
None
Description
Lead/Lag window function throws AnalysisException without ORDER BY clause:
SELECT lead(ten, four + 1) OVER (PARTITION BY four), ten, four FROM (SELECT * FROM tenk1 WHERE unique2 < 10 ORDER BY four, ten)s org.apache.spark.sql.AnalysisException Window function lead(ten#x, (four#x + 1), null) requires window to be ordered, please add ORDER BY clause. For example SELECT lead(ten#x, (four#x + 1), null)(value_expr) OVER (PARTITION BY window_partition ORDER BY window_ordering) from table;
Maybe we need fix this issue.
Attachments
Issue Links
- is duplicated by
-
SPARK-31512 make window function using order by optional
- Resolved
- links to