Kelvin Jiang created SPARK-47839:
------------------------------------
Summary: Fix Aggregate bug in RewriteWithExpression
Key: SPARK-47839
URL: https://issues.apache.org/jira/browse/SPARK-47839
Project: Spark
Issue Type: Improvement
Components: SQL
Affects Versions: 4.0.0
Reporter: Kelvin Jiang
The following query will fail:
```
SELECT NULLIF(id + 1, 1)
from range(10)
group by id
```
This is because `NullIf` gets rewritten to `With`, then `RewriteWithExpression`
tries to pull `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: [email protected]
For additional commands, e-mail: [email protected]