wgtmac commented on code in PR #55351:
URL: https://github.com/apache/arrow/pull/55351#discussion_r4432159218
##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -3453,6 +3453,22 @@ TEST(ArrowReadWrite, ListWithNoValues) {
CheckSimpleRoundtrip(table, 2, props_store_schema);
}
+TEST(ArrowReadWrite, NestedDictionaryMultipleRowGroups) {
+ // GH-45087: reading several row groups at once yields one chunk per row
group
+ // for a nested dictionary leaf, and the chunks have different dictionaries.
+ using ::arrow::field;
+
+ auto dict_type = ::arrow::dictionary(::arrow::int32(), ::arrow::utf8());
+ for (const auto& type : {list(dict_type), ::arrow::large_list(dict_type)}) {
+ ARROW_SCOPED_TRACE("type = ", type->ToString());
+ auto array =
+ ::arrow::ArrayFromJSON(type, R"([["a"], ["b", "a"], ["c", "a"],
["b"]])");
+ auto table = ::arrow::Table::Make(::arrow::schema({field("root", type)}),
{array});
Review Comment:
This test generates two row groups and both retain the full input dictionary
`["a", "b", "c"]`, so this exercises multiple chunks with identical
dictionaries.
Could we add a separate case with two independently built input chunks
aligned with the row groups, and compare the full-table read with a separately
built unified expected table?
--
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]