wgtmac commented on code in PR #35958:
URL: https://github.com/apache/arrow/pull/35958#discussion_r1220851202


##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5370,12 +5370,53 @@ TEST_F(ParquetPageIndexRoundTripTest, 
SimpleRoundTripWithStatsDisabled) {
       [6,     "f",  null     ]
     ])"}));
 
-  ReadPageIndexes(/*expect_num_row_groups=*/2, /*expect_num_pages=*/1);
+  ReadPageIndexes(/*expect_num_row_groups=*/1, /*expect_num_pages=*/1);
   for (auto& column_index : column_indexes_) {
     EXPECT_TRUE(column_index.empty);
   }
 }
 
+TEST_F(ParquetPageIndexRoundTripTest, SimpleRoundTripWithColumnStatsDisabled) {
+  auto writer_properties = WriterProperties::Builder()
+                               .enable_write_page_index()
+                               ->disable_statistics("c0")
+                               ->max_row_group_length(4)
+                               ->build();
+  auto schema = ::arrow::schema({::arrow::field("c0", ::arrow::int64()),
+                                 ::arrow::field("c1", ::arrow::utf8()),
+                                 ::arrow::field("c2", 
::arrow::list(::arrow::int64()))});
+  WriteFile(writer_properties, ::arrow::TableFromJSON(schema, {R"([
+      [1,     "a",  [1]      ],
+      [2,     "b",  [1, 2]   ],
+      [3,     "c",  [null]   ],
+      [null,  "d",  []       ],
+      [5,     null, [3, 3, 3]],
+      [6,     "f",  null     ]
+    ])"}));
+
+  ReadPageIndexes(/*expect_num_row_groups=*/2, /*expect_num_pages=*/1);
+
+  ColumnIndexObject empty_column_index{};
+  empty_column_index.empty = true;
+  EXPECT_THAT(
+      column_indexes_,
+      ::testing::ElementsAre(
+          empty_column_index,

Review Comment:
   Why add a new `empty` flag? Isn't `ColumnIndexObject{}` enough to represent 
a missing ColumnIndex?



##########
cpp/src/parquet/arrow/arrow_reader_writer_test.cc:
##########
@@ -5356,7 +5357,6 @@ TEST_F(ParquetPageIndexRoundTripTest, 
SimpleRoundTripWithStatsDisabled) {
   auto writer_properties = WriterProperties::Builder()
                                .enable_write_page_index()
                                ->disable_statistics()
-                               ->max_row_group_length(4)

Review Comment:
   Why this guy is removed?



-- 
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]

Reply via email to