uros-b commented on code in PR #57629:
URL: https://github.com/apache/spark/pull/57629#discussion_r3700536004


##########
sql/core/src/test/resources/sql-tests/results/distinct-map-aggregates.sql.out:
##########
@@ -0,0 +1,232 @@
+-- Automatically generated by SQLQueryTestSuite
+-- !query
+CREATE OR REPLACE TEMPORARY VIEW distinct_map_data AS SELECT * FROM VALUES
+  (2, map('a', 1, 'b', 2), 1, true),
+  (2, map('b', 2, 'a', 1), 1, true),
+  (1, map('a', 1, 'b', 2), 1, true),
+  (1, map('a', 3), 2, false)
+AS distinct_map_data(g, m, id, should_keep)
+-- !query schema
+struct<>
+-- !query output
+
+
+
+-- !query
+SELECT COUNT(DISTINCT m) FROM distinct_map_data
+-- !query schema
+struct<count(DISTINCT m):bigint>
+-- !query output
+2
+
+
+-- !query
+SELECT SIZE(COLLECT_LIST(DISTINCT m)) FROM distinct_map_data
+-- !query schema
+struct<size(collect_list(DISTINCT m)):int>
+-- !query output
+2
+
+
+-- !query
+SELECT COLLECT_LIST(DISTINCT m) FROM distinct_map_data
+-- !query schema
+struct<collect_list(DISTINCT m):array<map<string,int>>>
+-- !query output
+[{"a":1,"b":2},{"a":3}]

Review Comment:
   Here we seem to assert the order, which is not guaranteed in the query 
itself, let's rewrite/modify the query a bit in order to avoid flakiness in the 
future



-- 
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]

Reply via email to