wgtmac commented on code in PR #48692:
URL: https://github.com/apache/arrow/pull/48692#discussion_r2719855582
##########
cpp/src/parquet/column_writer_test.cc:
##########
@@ -2463,5 +2464,84 @@ TYPED_TEST(TestBloomFilterWriter, Basic) {
}
}
+class TestArrowWriteSerialize : public ::testing::Test {
Review Comment:
I wrote a simple test in `arrow_reader_writer_test.cc`:
```cpp
TEST(TestArrowReadWrite, AllNulls) {
auto schema = ::arrow::schema({::arrow::field("all_nulls",
::arrow::int32())});
constexpr int64_t length = 10;
ASSERT_OK_AND_ASSIGN(auto null_bitmap,
::arrow::AllocateEmptyBitmap(length));
auto array_data = ::arrow::ArrayData::Make(
::arrow::int32(), length, {null_bitmap, /*values=*/nullptr},
/*null_count=*/length);
auto array = ::arrow::MakeArray(array_data);
auto table = ::arrow::Table::Make(schema, {array});
auto sink = CreateOutputStream();
ASSERT_OK_AND_ASSIGN(auto writer, parquet::arrow::FileWriter::Open(
*schema,
::arrow::default_memory_pool(), sink,
parquet::default_writer_properties(),
parquet::default_arrow_writer_properties()));
ASSERT_OK(writer->WriteTable(*table, length));
ASSERT_OK(writer->Close());
ASSERT_OK_AND_ASSIGN(auto buffer, sink->Finish());
std::shared_ptr<::arrow::Table> read_table;
ASSERT_OK_AND_ASSIGN(auto reader,
parquet::arrow::OpenFile(std::make_shared<BufferReader>(buffer),
::arrow::default_memory_pool()));
ASSERT_OK(reader->ReadTable(&read_table));
ASSERT_TRUE(table->Equals(*read_table));
}
```
It now fails with `'writer->WriteTable(*table, length)' failed with Invalid:
Column 0: In chunk 0: Invalid: Missing values buffer in non-empty fixed-width
array`.
--
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]