kosiew commented on code in PR #23280:
URL: https://github.com/apache/datafusion/pull/23280#discussion_r3548804883
##########
datafusion/sqllogictest/test_files/dictionary.slt:
##########
@@ -515,3 +515,121 @@ DROP TABLE dict_hash_10;
statement ok
DROP TABLE dict_hash_src;
+
+statement ok
+CREATE TABLE dict_large_utf8 AS
+SELECT
+ arrow_cast(column1, 'Dictionary(Int32, LargeUtf8)') AS tag,
+ arrow_cast(column2, 'Float64') AS val
+FROM (VALUES ('alpha', 1.0), ('beta', 2.0), ('alpha', 3.0), ('gamma', 4.0),
('beta', 5.0), (NULL, 6.0));
+
+query TRI rowsort
+SELECT tag, SUM(val), COUNT(*) FROM dict_large_utf8 GROUP BY tag;
+----
+NULL 6 1
+alpha 4 2
+beta 7 2
+gamma 4 1
+
+statement ok
+DROP TABLE dict_large_utf8;
+
+# multiple dictionary columns as group keys
+
+statement ok
+CREATE TABLE dict_multi_key AS
Review Comment:
Nice addition. This expands the GROUP BY coverage for multiple dictionary
columns well.
One thought for a future follow-up: all of the rows here come from a single
VALUES-derived table, so this is mostly exercising one dictionary encoding per
column. It could be useful to add a case where the same logical values arrive
in different batches or inputs with different dictionary key assignments. That
would help catch implementations that accidentally group by dictionary keys
instead of decoded values.
Not blocking though. The current tests already cover multiple dictionary key
columns, mixed key widths, nulls, and aggregates.
--
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]