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 2023/04/10 03:16:00 UTC
[jira] [Commented] (SPARK-43050) Fix construct aggregate expressions by replacing grouping functions
[ https://issues.apache.org/jira/browse/SPARK-43050?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17710031#comment-17710031 ]
Hyukjin Kwon commented on SPARK-43050:
--------------------------------------
https://github.com/apache/spark/pull/40685
> Fix construct aggregate expressions by replacing grouping functions
> -------------------------------------------------------------------
>
> Key: SPARK-43050
> URL: https://issues.apache.org/jira/browse/SPARK-43050
> Project: Spark
> Issue Type: Bug
> Components: SQL
> Affects Versions: 3.5.0
> Reporter: Yuming Wang
> Priority: Major
>
> {code:sql}
> CREATE TEMPORARY VIEW grouping AS SELECT * FROM VALUES
> ("1", "2", "3", 1),
> ("4", "5", "6", 1),
> ("7", "8", "9", 1)
> as grouping(a, b, c, d);
> {code}
> {noformat}
> spark-sql (default)> SELECT CASE WHEN a IS NULL THEN count(b) WHEN b IS NULL THEN count(c) END
> > FROM grouping
> > GROUP BY GROUPING SETS (a, b, c);
> [MISSING_AGGREGATION] The non-aggregating expression "b" is based on columns which are not participating in the GROUP BY clause.
> {noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org