[ https://issues.apache.org/jira/browse/SPARK-47839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Wenchen Fan resolved SPARK-47839. --------------------------------- Fix Version/s: 4.0.0 Resolution: Fixed Issue resolved by pull request 46034 [https://github.com/apache/spark/pull/46034] > Fix Aggregate bug in RewriteWithExpression > ------------------------------------------ > > Key: SPARK-47839 > URL: https://issues.apache.org/jira/browse/SPARK-47839 > Project: Spark > Issue Type: Bug > Components: SQL > Affects Versions: 4.0.0 > Reporter: Kelvin Jiang > Assignee: Kelvin Jiang > Priority: Major > Labels: pull-request-available > Fix For: 4.0.0 > > > The following query will fail: > {code:SQL} > SELECT NULLIF(id + 1, 1) > from range(10) > group by id > {code} > This is because {{NullIf}} gets rewritten to {{With}}, then > {{RewriteWithExpression}} tries to pull common expression {{id + 1}} out of > the aggregate, resulting in an invalid plan. -- 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