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/09/01 11:13:00 UTC
[jira] [Commented] (SPARK-36637) Bad error message when using
non-existing named window
[ https://issues.apache.org/jira/browse/SPARK-36637?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17408098#comment-17408098 ]
Apache Spark commented on SPARK-36637:
--------------------------------------
User 'AngersZhuuuu' has created a pull request for this issue:
https://github.com/apache/spark/pull/33892
> Bad error message when using non-existing named window
> ------------------------------------------------------
>
> Key: SPARK-36637
> URL: https://issues.apache.org/jira/browse/SPARK-36637
> Project: Spark
> Issue Type: Improvement
> Components: SQL
> Affects Versions: 3.3.0
> Reporter: Wenchen Fan
> Priority: Major
>
> {code:java}
> CREATE TABLE employees
> (name STRING, dept STRING, salary INT, age INT);
> SELECT AVG(age) OVER win AS salary,
> AVG(salary) OVER win AS avgsalary,
> MIN(salary) OVER win AS minsalary,
> MAX(salary) OVER win AS maxsalary,
> COUNT(1) OVER win AS numEmps
> FROM employees;
> Error in query: unresolved operator 'Aggregate [unresolvedwindowexpression(avg(age#43), WindowSpecReference(win)) AS salary#34, unresolvedwindowexpression(avg(salary#42), WindowSpecReference(win)) AS avgsalary#35, unresolvedwindowexpression(min(salary#42), WindowSpecReference(win)) AS minsalary#36, unresolvedwindowexpression(max(salary#42), WindowSpecReference(win)) AS maxsalary#37, unresolvedwindowexpression(count(1), WindowSpecReference(win)) AS numEmps#38];
> 'Aggregate [unresolvedwindowexpression(avg(age#43), WindowSpecReference(win)) AS salary#34, unresolvedwindowexpression(avg(salary#42), WindowSpecReference(win)) AS avgsalary#35, unresolvedwindowexpression(min(salary#42), WindowSpecReference(win)) AS minsalary#36, unresolvedwindowexpression(max(salary#42), WindowSpecReference(win)) AS maxsalary#37, unresolvedwindowexpression(count(1), WindowSpecReference(win)) AS numEmps#38]
> +- SubqueryAlias spark_catalog.default.employees
> +- HiveTableRelation [`default`.`employees`, org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe, Data Cols: [name#40, dept#41, salary#42, age#43], Partition Cols: []]
> {code}
--
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