uros-b commented on code in PR #59917: URL: https://github.com/apache/spark/pull/59917#discussion_r4423574993
########## sql/core/src/test/resources/sql-tests/inputs/group-by.sql: ########## @@ -338,3 +338,49 @@ SELECT col1 FROM t1 GROUP BY ALL HAVING any_value(col2) = 'a'; SELECT col1 FROM t1 GROUP BY col1 HAVING EXISTS (SELECT any_value(t1.col2) == 0); DROP TABLE t1; + Review Comment: +1 with the comment above ########## sql/core/src/test/resources/sql-tests/inputs/group-by.sql: ########## @@ -338,3 +338,49 @@ SELECT col1 FROM t1 GROUP BY ALL HAVING any_value(col2) = 'a'; SELECT col1 FROM t1 GROUP BY col1 HAVING EXISTS (SELECT any_value(t1.col2) == 0); DROP TABLE t1; + Review Comment: “GROUP BY ALL / ordinal … groups by the generated output” is the wrong rule. The analyzer golden is Generate explode(_gen_input_0) over Aggregate [a], [a AS _gen_input_0]: grouping is on the array, explode runs after aggregation. array(1, 2) / array(3) cannot tell that from grouping by exploded values. GROUP BY ALL over array(1, 1) would return 1 twice. -- 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]
