zanmato1984 commented on code in PR #43389: URL: https://github.com/apache/arrow/pull/43389#discussion_r1710761731
########## cpp/src/arrow/compute/row/row_test.cc: ########## @@ -244,23 +228,15 @@ TEST(RowTableOffsetOverflow, LARGE_MEMORY_TEST(AppendFrom)) { RowTableImpl row_table; ASSERT_OK(row_table.Init(pool, table_metadata)); - // Appending the seed 7 times should be fine. - for (int i = 0; i < num_rows - 1; ++i) { + // Append seed num_rows times. + for (int i = 0; i < num_rows; ++i) { ASSERT_OK(row_table.AppendSelectionFrom(row_table_seed, num_rows_seed, /*source_row_ids=*/NULLPTR)); } - // Appending the seed the 8-th time should overflow. - int64_t length_per_row = table_metadata.fixed_length + length_per_binary; - std::stringstream expected_error_message; - expected_error_message - << "Invalid: Offset overflow detected in RowTableImpl::AppendSelectionFrom for row " - << num_rows - 1 << " of length " << length_per_row - << " bytes, current length in total is " << length_per_row * (num_rows - 1) - << " bytes"; - ASSERT_RAISES_WITH_MESSAGE(Invalid, expected_error_message.str(), - row_table.AppendSelectionFrom(row_table_seed, num_rows_seed, - /*source_row_ids=*/NULLPTR)); + ASSERT_GT(row_table.offsets()[num_rows - 1], std::numeric_limits<uint32_t>::max()); + ASSERT_GT(row_table.offsets()[num_rows], + row_table.offsets()[num_rows - 1] + length_per_binary); Review Comment: Now gracefully asserting equality. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: github-unsubscr...@arrow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org