You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Hyukjin Kwon (JIRA)" <ji...@apache.org> on 2019/05/21 04:12:23 UTC

[jira] [Resolved] (SPARK-18170) Confusing error message when using rangeBetween without specifying an "orderBy"

     [ https://issues.apache.org/jira/browse/SPARK-18170?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Hyukjin Kwon resolved SPARK-18170.
----------------------------------
    Resolution: Incomplete

> Confusing error message when using rangeBetween without specifying an "orderBy"
> -------------------------------------------------------------------------------
>
>                 Key: SPARK-18170
>                 URL: https://issues.apache.org/jira/browse/SPARK-18170
>             Project: Spark
>          Issue Type: Improvement
>          Components: SQL
>            Reporter: Weiluo Ren
>            Priority: Minor
>              Labels: bulk-closed
>
> {code}
> spark.range(1,3).select(sum('id) over Window.rangeBetween(0,1)).show
> {code}
> throws runtime exception:
> {code}
> Non-Zero range offsets are not supported for windows with multiple order expressions.
> {code}
> which is confusing in this case because we don't have any order expression here.
> How about add a check on
> {code}
> orderSpec.isEmpty
> {code}
> at https://github.com/apache/spark/blob/master/sql/core/src/main/scala/org/apache/spark/sql/execution/window/WindowExec.scala#L141
> and throw an exception saying "no order expressions is specified"?



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

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