You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "Apache Spark (Jira)" <ji...@apache.org> on 2021/01/31 10:02:00 UTC
[jira] [Assigned] (SPARK-34296) AggregateWindowFunction#frame
should not always use UnboundedPreceding
[ https://issues.apache.org/jira/browse/SPARK-34296?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Apache Spark reassigned SPARK-34296:
------------------------------------
Assignee: (was: Apache Spark)
> AggregateWindowFunction#frame should not always use UnboundedPreceding
> ----------------------------------------------------------------------
>
> Key: SPARK-34296
> URL: https://issues.apache.org/jira/browse/SPARK-34296
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.0.2, 3.1.0, 3.2.0
> Reporter: Yuming Wang
> Priority: Major
>
> How to reproduce this issue:
> {code:sql}
> CREATE TABLE test_unboundedpreceding(SELLER_ID INT) using parquet;
> SELECT
> DENSE_RANK() OVER (
> ORDER BY SELLER_ID ROWS BETWEEN 10 PRECEDING
> AND CURRENT ROW
> ) AS SELLER_RANK
> FROM
> test_unboundedpreceding
> {code}
> It will throw:
> {noformat}
> Error: Error running query: org.apache.spark.sql.AnalysisException: Window Frame specifiedwindowframe(RowFrame, -10, currentrow$()) must match the required frame specifiedwindowframe(RowFrame, unboundedpreceding$(), currentrow$()); (state=,code=0)
> {noformat}
> Related code:
> https://github.com/apache/spark/blob/cde697a479a2f67c6bc4281f39a1ab2ff6a9d17d/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/windowExpressions.scala#L514
--
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