spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "philipse (Jira)" <>
Subject [jira] [Created] (SPARK-31512) make window function using order by optional
Date Tue, 21 Apr 2020 23:56:03 GMT
philipse created SPARK-31512:

             Summary: make window function using order by optional
                 Key: SPARK-31512
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 2.4.5
         Environment: spark2.4.5

            Reporter: philipse

Hi all

In other sql dialect ,order by is not the must when using window function,we may make it pararmteterized

the below is the case :

*select row_number()over() from test1*

Error: org.apache.spark.sql.AnalysisException: Window function row_number() requires window
to be ordered, please add ORDER BY clause. For example SELECT row_number()(value_expr) OVER
(PARTITION BY window_partition ORDER BY window_ordering) from table; (state=,code=0)


So. i suggest make it as a choice,or we will meet the error when migrate sql from other dialect,such
as hive

This message was sent by Atlassian Jira

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message