paleolimbot commented on code in PR #45459:
URL: https://github.com/apache/arrow/pull/45459#discussion_r1975888826
##########
cpp/src/parquet/reader_test.cc:
##########
@@ -1857,4 +1863,172 @@ TEST(PageIndexReaderTest, ReadFileWithoutPageIndex) {
ASSERT_EQ(nullptr, row_group_index_reader);
}
+class TestGeometryLogicalType : public ::testing::Test {
+ public:
+ const int kNumRows = 1000;
+
+ void WriteTestData(ParquetDataPageVersion data_page_version,
+ bool enable_write_page_index, bool write_arrow) {
+ // Make schema
+ schema::NodeVector fields;
+ fields.push_back(PrimitiveNode::Make("g", Repetition::REQUIRED,
+
GeometryLogicalType::Make("srid:1234"),
+ Type::BYTE_ARRAY));
+ auto schema = std::static_pointer_cast<GroupNode>(
+ GroupNode::Make("schema", Repetition::REQUIRED, fields));
+
+ // Write small batches and small data pages
+ auto writer_props_builder = WriterProperties::Builder();
+
writer_props_builder.write_batch_size(64)->data_pagesize(128)->data_page_version(
+ data_page_version);
+ if (enable_write_page_index) {
+ writer_props_builder.enable_write_page_index();
+ }
+
+ std::shared_ptr<WriterProperties> writer_props =
writer_props_builder.build();
+
+ ASSERT_OK_AND_ASSIGN(auto out_file,
::arrow::io::BufferOutputStream::Create());
+ std::shared_ptr<ParquetFileWriter> file_writer =
+ ParquetFileWriter::Open(out_file, schema, writer_props);
+ RowGroupWriter* rg_writer = file_writer->AppendRowGroup();
+
+ // write WKB points to columns
+ auto* writer = static_cast<ByteArrayWriter*>(rg_writer->NextColumn());
Review Comment:
Done!
--
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]