Weiluo Ren created SPARK-18170:
----------------------------------
Summary: 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: Bug
Components: SQL
Reporter: Weiluo Ren
Priority: Minor
{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
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]