Skip to content

Commit

Permalink
Add debug print
Browse files Browse the repository at this point in the history
  • Loading branch information
zanmato1984 committed Jul 3, 2024
1 parent 8619d9e commit daf6d15
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cpp/src/arrow/compute/row/compare_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,7 @@ TEST(KeyCompare, CompareColumnsToRowsLarge) {

batch_left = ExecBatch(std::move(values), num_rows);
ASSERT_OK(ColumnArraysFromExecBatch(batch_left, &columns_left));
std::cout << "Columns done." << std::endl;
}

// The right side row table.
Expand All @@ -239,14 +240,17 @@ TEST(KeyCompare, CompareColumnsToRowsLarge) {
ASSERT_NE(row_table_right.offsets(), NULLPTR);
// The whole point of this test.
ASSERT_GT(row_table_right.offsets()[num_rows - 1], two_gb);
std::cout << "Rows done." << std::endl;
}

// The rows to compare.
std::vector<uint32_t> row_ids_to_compare(num_rows);
std::iota(row_ids_to_compare.begin(), row_ids_to_compare.end(), 0);
std::cout << "Row ids done." << std::endl;

TempVectorStack stack;
ASSERT_OK(stack.Init(pool, KeyCompare::CompareColumnsToRowsTempStackUsage(num_rows)));
std::cout << "Stack done." << std::endl;
LightContext ctx{CpuInfo::GetInstance()->hardware_flags(), &stack};

{
Expand All @@ -259,6 +263,7 @@ TEST(KeyCompare, CompareColumnsToRowsLarge) {
/*are_cols_in_encoding_order=*/true,
/*out_match_bitvector_maybe_null=*/NULLPTR);
ASSERT_EQ(num_rows_no_match, 0);
std::cout << "Compare 1 done." << std::endl;
}

{
Expand All @@ -271,6 +276,7 @@ TEST(KeyCompare, CompareColumnsToRowsLarge) {
/*are_cols_in_encoding_order=*/true, match_bitvector.data());
ASSERT_EQ(arrow::internal::CountSetBits(match_bitvector.data(), 0, num_rows),
num_rows);
std::cout << "Compare 2 done." << std::endl;
}

std::vector<uint16_t> selection_left(num_rows);
Expand All @@ -286,6 +292,7 @@ TEST(KeyCompare, CompareColumnsToRowsLarge) {
/*are_cols_in_encoding_order=*/true,
/*out_match_bitvector_maybe_null=*/NULLPTR);
ASSERT_EQ(num_rows_no_match, 0);
std::cout << "Compare 3 done." << std::endl;
}

{
Expand All @@ -298,6 +305,7 @@ TEST(KeyCompare, CompareColumnsToRowsLarge) {
/*are_cols_in_encoding_order=*/true, match_bitvector.data());
ASSERT_EQ(arrow::internal::CountSetBits(match_bitvector.data(), 0, num_rows),
num_rows);
std::cout << "Compare 4 done." << std::endl;
}
}
#endif // ARROW_VALGRIND
Expand Down

0 comments on commit daf6d15

Please sign in to comment.