Skip to content

Commit f941118

Browse files
authored
MINOR: [C++] Use the array returned by TweakValidityBit (#14221)
TweakValidityBit returns a new Array so the calling function should use it. https://github.com/apache/arrow/blob/6cc37cf2d1ba72c46b64fbc7ac499bd0d7296d20/cpp/src/arrow/testing/gtest_util.cc#L568-L579 Authored-by: kshitij12345 <[email protected]> Signed-off-by: David Li <[email protected]>
1 parent cc76736 commit f941118

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎cpp/src/arrow/compute/kernels/vector_nested_test.cc‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,9 @@ TEST(TestVectorNested, ListFlatten) {
3636
CheckVectorUnary("list_flatten", input, expected);
3737

3838
// Construct a list with a non-empty null slot
39-
TweakValidityBit(input, 0, false);
39+
auto tweaked = TweakValidityBit(input, 0, false);
4040
expected = ArrayFromJSON(int16(), "[2, 3]");
41-
CheckVectorUnary("list_flatten", input, expected);
41+
CheckVectorUnary("list_flatten", tweaked, expected);
4242
}
4343
}
4444

@@ -86,9 +86,9 @@ TEST(TestVectorNested, ListParentIndices) {
8686

8787
// Construct a list with a non-empty null slot
8888
auto input = ArrayFromJSON(list(int16()), "[[0, null, 1], [0, 0], [2, 3], [], [4, 5]]");
89-
TweakValidityBit(input, 1, false);
89+
auto tweaked = TweakValidityBit(input, 1, false);
9090
auto expected = ArrayFromJSON(int64(), "[0, 0, 0, 1, 1, 2, 2, 4, 4]");
91-
CheckVectorUnary("list_parent_indices", input, expected);
91+
CheckVectorUnary("list_parent_indices", tweaked, expected);
9292
}
9393

9494
TEST(TestVectorNested, ListParentIndicesChunkedArray) {

0 commit comments

Comments
 (0)