Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/22696#discussion_r224422094
--- Diff: sql/core/src/test/resources/sql-tests/inputs/group-by.sql ---
@@ -73,3 +73,9 @@ where b.z != b.z;
-- SPARK-24369 multiple distinct aggregations having the same argument set
SELECT corr(DISTINCT x, y), corr(DISTINCT y, x), count(*)
FROM (VALUES (1, 1), (2, 2), (2, 2)) t(x, y);
+
+-- SPARK-25708 HAVING without GROUP BY means global aggregate
+SELECT 1 FROM range(10) HAVING true;
+
+-- SPARK-25708 HAVING without GROUP BY means global aggregate
+SELECT 1 FROM range(10) HAVING MAX(id) > 0;
--- End diff --
before the fix, this fails with
```
java.lang.UnsupportedOperationException: Cannot evaluate expression:
max(input[0, bigint, false])
```
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]