[ https://issues.apache.org/jira/browse/SPARK-49000?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17870120#comment-17870120 ]
Kent Yao commented on SPARK-49000: ---------------------------------- The commit is reverted to fix CI, please send a backport PR for 3.5 > Aggregation with DISTINCT gives wrong results when dealing with literals > ------------------------------------------------------------------------ > > Key: SPARK-49000 > URL: https://issues.apache.org/jira/browse/SPARK-49000 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 3.0.0, 3.1.3, 3.2.4, 3.5.1, 3.3.4, 3.4.3 > Reporter: Uroš Bojanić > Assignee: Uroš Bojanić > Priority: Critical > Labels: correctness, pull-request-available > Fix For: 4.0.0 > > > Aggregation with *DISTINCT* gives wrong results when dealing with literals. > It appears that this bug affects all (or most) released versions of Spark. > > For example: > {code:java} > select count(distinct 1) from t{code} > returns 1, while the correct result should be 0. > > For reference: > {code:java} > select count(1) from t{code} > returns 0, which is the correct and expected result. > > In these examples, suppose that *t* is a table with any columns). -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@spark.apache.org For additional commands, e-mail: issues-h...@spark.apache.org