spark-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "philipse (Jira)" <j...@apache.org>
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
                 URL: https://issues.apache.org/jira/browse/SPARK-31512
             Project: Spark
          Issue Type: Improvement
          Components: SQL
    Affects Versions: 2.4.5
         Environment: spark2.4.5

hadoop2.7.7
            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
(v8.3.4#803005)

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


Mime
View raw message