Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions cpp/src/arrow/compute/kernels/scalar_if_else_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1095,6 +1095,16 @@ TYPED_TEST(TestIfElseDict, DifferentDictionaries) {
CheckDictionary("if_else", {MakeNullScalar(boolean()), values1, values2});
}

// GH-47825: BitmapOp overrides partial leading byte for unaligned chunked execution.
TEST(TestIfElse, ChunkedUnalignedBitmapOp) {
auto cond = ArrayFromJSON(boolean(), "[true, true]");
auto if_true = ChunkedArrayFromJSON(boolean(), {"[true]", "[true]"});
auto if_false = ArrayFromJSON(boolean(), "[true, true]");
ASSERT_OK_AND_ASSIGN(auto result, CallFunction("if_else", {cond, if_true, if_false}));
ASSERT_OK(result.chunked_array()->ValidateFull());
AssertDatumsEqual(ChunkedArrayFromJSON(boolean(), {"[true, true]"}), result);
}

Datum MakeStruct(const std::vector<Datum>& conds) {
if (conds.size() == 0) {
// The tests below want a struct scalar when no condition values passed,
Expand Down
18 changes: 10 additions & 8 deletions cpp/src/arrow/util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,16 @@ add_arrow_test(bit-utility-test
SOURCES
bit_block_counter_test.cc
bit_util_test.cc
bitmap_test.cc
bpacking_test.cc
rle_encoding_test.cc)
rle_encoding_test.cc
test_common.cc)

add_arrow_test(crc32-test
SOURCES
crc32_test.cc
EXTRA_LINK_LIBS
Boost::headers)

add_arrow_test(threading-utility-test
SOURCES
Expand All @@ -110,16 +118,10 @@ add_arrow_test(threading-utility-test
test_common.cc
thread_pool_test.cc)

add_arrow_test(crc32-test
SOURCES
crc32_test.cc
EXTRA_LINK_LIBS
Boost::headers)

add_arrow_benchmark(bit_block_counter_benchmark)
add_arrow_benchmark(bit_util_benchmark)
add_arrow_benchmark(bpacking_benchmark)
add_arrow_benchmark(bitmap_reader_benchmark)
add_arrow_benchmark(bpacking_benchmark)
add_arrow_benchmark(cache_benchmark)
add_arrow_benchmark(compression_benchmark)
add_arrow_benchmark(decimal_benchmark)
Expand Down
Loading
Loading