This is an automated email from the ASF dual-hosted git repository.
uwe pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 9ceda35 ARROW-2244: [C++] Add unit test to explicitly check that
NullArray internal data set correctly in Slice operations
9ceda35 is described below
commit 9ceda35a6860c837a91aeca48e7c1d3996e184b5
Author: Wes McKinney <[email protected]>
AuthorDate: Mon Mar 5 09:25:37 2018 +0100
ARROW-2244: [C++] Add unit test to explicitly check that NullArray internal
data set correctly in Slice operations
Author: Wes McKinney <[email protected]>
Closes #1696 from wesm/ARROW-2244 and squashes the following commits:
7cf2bed <Wes McKinney> Add test for ARROW-2244
---
cpp/src/arrow/array-test.cc | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/cpp/src/arrow/array-test.cc b/cpp/src/arrow/array-test.cc
index 4aaf182..c3ac082 100644
--- a/cpp/src/arrow/array-test.cc
+++ b/cpp/src/arrow/array-test.cc
@@ -136,9 +136,15 @@ TEST_F(TestArray, SliceRecomputeNullCount) {
auto arr = std::make_shared<Int32Array>(16, data, nullptr, -1);
ASSERT_EQ(0, arr->null_count());
+}
+TEST_F(TestArray, NullArraySliceNullCount) {
auto null_arr = std::make_shared<NullArray>(10);
auto null_arr_sliced = null_arr->Slice(3, 6);
+
+ // The internal null count is 6, does not require recomputation
+ ASSERT_EQ(6, null_arr_sliced->data()->null_count);
+
ASSERT_EQ(6, null_arr_sliced->null_count());
}
--
To stop receiving notification emails like this one, please contact
[email protected].