cxzl25 opened a new issue, #1524:
URL: https://github.com/apache/auron/issues/1524
**Is your feature request related to a problem? Please describe.**
```
25/10/26 18:24:46 WARN AuronConverters: Falling back exec:
HashAggregateExec: assertion failed: partial AggregateExec is not native
25/10/26 18:24:57 WARN AuronConverters: Falling back exec:
HashAggregateExec: assertion failed
25/10/26 18:24:59 WARN AuronConverters: Falling back exec:
HashAggregateExec: assertion failed: partial AggregateExec is not native
```
```sql
SELECT
region,
year,
COUNT(DISTINCT product) AS distinct_product_count,
COUNT(DISTINCT region) AS distinct_region_count
FROM (
SELECT
CASE WHEN id % 2 = 0 THEN 'Region1' ELSE 'Region2' END AS region,
CASE WHEN id % 3 = 0 THEN 'ProductA' ELSE 'ProductB' END AS product,
2023 AS year,
id * 100 AS sales_amount
FROM RANGE(10)
) AS sales
GROUP BY region, year;
```
Because Spark rule RewriteDistinctAggregates will rewrite multiple COUNT
DISTINCT and add gid filter, Auron convertMoreAggregateExpr restricts the
filter to be empty.
https://github.com/apache/auron/blob/3eb0e7353d0e280ddc7ae3dab77b8206c31dfb76/spark-extension-shims-spark/src/main/scala/org/apache/spark/sql/auron/ShimsImpl.scala#L558-L559
https://github.com/apache/spark/blob/65755bde3cb8b09bfaa8776fe6b4a182fd74ee0b/sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/optimizer/RewriteDistinctAggregates.scala#L249-L251
**Describe the solution you'd like**
**Describe alternatives you've considered**
**Additional context**
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]