Copilot commented on code in PR #49937:
URL: https://github.com/apache/arrow/pull/49937#discussion_r3387609022
##########
cpp/src/arrow/array/array_dict_test.cc:
##########
@@ -1761,4 +1761,83 @@ TEST(TestDictionaryUnifier, TableZeroColumns) {
AssertTablesEqual(*table, *unified);
}
+// GH-49689: Ordered dictionary tests
+
+TEST(TestDictionaryBuilderOrdered, TypePreservesOrderedFlag) {
+ for (bool ordered : {true, false}) {
+ ARROW_SCOPED_TRACE("ordered = ", ordered);
+ auto dict_type = dictionary(int8(), utf8(), ordered);
+ ASSERT_OK_AND_ASSIGN(auto boxed_buider, MakeBuilder(dict_type));
+
+ auto builder_type = boxed_builder->type();
+ ASSERT_EQ(checked_cast<const DictionaryType&>(*builder_type).ordered(),
ordered);
Review Comment:
This new test won't compile due to a misspelled variable (`boxed_buider`)
and then referencing `boxed_builder`. Rename the variable consistently so the
builder can be used to check the constructed type.
--
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]