Skip to content

Commit bcc614b

Browse files
committed
fix tests
1 parent 0a21ada commit bcc614b

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

cpp/src/arrow/array/array_dict_test.cc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,17 +1768,17 @@ TEST(TestDictionaryBuilderOrdered, TypePreservesOrderedFlag) {
17681768
std::unique_ptr<ArrayBuilder> boxed_builder;
17691769
ASSERT_OK(MakeBuilder(default_memory_pool(), ordered_type, &boxed_builder));
17701770

1771-
const auto& builder_type = checked_cast<const DictionaryType&>(*boxed_builder->type());
1772-
ASSERT_TRUE(builder_type.ordered());
1771+
auto builder_type = boxed_builder->type();
1772+
ASSERT_TRUE(checked_cast<const DictionaryType&>(*builder_type).ordered());
17731773
}
17741774

17751775
TEST(TestDictionaryBuilderOrdered, UnorderedTypeStaysUnordered) {
17761776
auto unordered_type = dictionary(int8(), utf8(), /*ordered=*/false);
17771777
std::unique_ptr<ArrayBuilder> boxed_builder;
17781778
ASSERT_OK(MakeBuilder(default_memory_pool(), unordered_type, &boxed_builder));
17791779

1780-
const auto& builder_type = checked_cast<const DictionaryType&>(*boxed_builder->type());
1781-
ASSERT_FALSE(builder_type.ordered());
1780+
auto builder_type = boxed_builder->type();
1781+
ASSERT_FALSE(checked_cast<const DictionaryType&>(*builder_type).ordered());
17821782
}
17831783

17841784
TEST(TestDictionaryBuilderOrdered, FinishPreservesOrderedFlag) {
@@ -1834,8 +1834,8 @@ TEST(TestDictionaryBuilderOrdered, MakeDictionaryBuilderPreservesOrdered) {
18341834
ASSERT_OK(MakeDictionaryBuilder(default_memory_pool(), ordered_type,
18351835
/*dictionary=*/nullptr, &builder));
18361836

1837-
const auto& builder_type = checked_cast<const DictionaryType&>(*builder->type());
1838-
ASSERT_TRUE(builder_type.ordered());
1837+
auto builder_type = builder->type();
1838+
ASSERT_TRUE(checked_cast<const DictionaryType&>(*builder_type).ordered());
18391839
}
18401840

18411841
} // namespace arrow

0 commit comments

Comments
 (0)