pitrou commented on code in PR #44796:
URL: https://github.com/apache/arrow/pull/44796#discussion_r1850597574
##########
cpp/src/parquet/column_writer_test.cc:
##########
@@ -1001,8 +1001,9 @@ TEST(TestColumnWriter, RepeatedListsUpdateSpacedBug) {
auto values_data = reinterpret_cast<const int32_t*>(values_buffer->data());
std::shared_ptr<Buffer> valid_bits;
- ASSERT_OK_AND_ASSIGN(valid_bits, ::arrow::internal::BytesToBits(
- {1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1,
1}));
+ uint8_t bitmap_bytes[] = {1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1};
+ ASSERT_OK_AND_ASSIGN(valid_bits,
+
::arrow::internal::BytesToBits(::arrow::util::span(bitmap_bytes)));
Review Comment:
Can use `std::vector` inside the test itself and it should implicitly
convert to `span`.
```suggestion
std::vector<uint8_t> bitmap_bytes = {1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 0, 1,
1};
ASSERT_OK_AND_ASSIGN(valid_bits,
::arrow::internal::BytesToBits(bitmap_bytes));
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]