pan3793 commented on code in PR #44352: URL: https://github.com/apache/spark/pull/44352#discussion_r1431429678
########## sql/core/src/test/resources/sql-tests/inputs/having.sql: ########## @@ -33,3 +33,27 @@ SELECT c1 FROM VALUES (1, 2) as t(c1, c2) GROUP BY GROUPING SETS(t.c1) HAVING t. SELECT c1 FROM VALUES (1, 2) as t(c1, c2) GROUP BY CUBE(t.c1) HAVING t.c1 = 1; SELECT c1 FROM VALUES (1, 2) as t(c1, c2) GROUP BY ROLLUP(t.c1) HAVING t.c1 = 1; SELECT c1 FROM VALUES (1, 2) as t(c1, c2) GROUP BY t.c1 HAVING t.c1 = 1; + +-- SPARK-28386: Resolve ORDER BY column with/without HAVING clause, while the column presents on SELECT list +SELECT k FROM hav GROUP BY k ORDER BY k; +SELECT k FROM hav GROUP BY k HAVING sum(v) > 2 ORDER BY k; Review Comment: yes, should I only retain the fixed SQL? -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
