Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored and pitrou committed Apr 15, 2024
1 parent 616a37b commit 9ae54ae
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions cpp/src/arrow/array/array_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1309,12 +1309,11 @@ TEST(TestBooleanArray, TrueCountFalseCount) {
CheckArray(checked_cast<const BooleanArray&>(*arr->Slice(0, 0)));

// GH-41016 true_count() with array without validity buffer with null_count of -1
auto data = ArrayFromJSON(boolean(), "[true, false, true]")->data();
data->null_count = -1;
auto arr_unknown_null_count = std::make_shared<BooleanArray>(data);
auto arr_unknown_null_count = ArrayFromJSON(boolean(), "[true, false, true]");
arr_unknown_null_count->data()->null_count = kUnknownNullCount;
ASSERT_EQ(arr_unknown_null_count->data()->null_count.load(), -1);
ASSERT_EQ(arr_unknown_null_count->null_bitmap(), nullptr);
ASSERT_EQ(arr_unknown_null_count->true_count(), 2);
ASSERT_EQ(checked_pointer_cast<BooleanArray>(arr_unknown_null_count)->true_count(), 2);
}

TEST(TestPrimitiveAdHoc, TestType) {
Expand Down

0 comments on commit 9ae54ae

Please sign in to comment.