etseidl commented on code in PR #8817:
URL: https://github.com/apache/arrow-rs/pull/8817#discussion_r2516080152


##########
parquet/src/file/metadata/writer.rs:
##########
@@ -227,22 +231,38 @@ impl<'a, W: Write> ThriftMetadataWriter<'a, W> {
             None => builder.set_row_groups(row_groups),
         };
 
-        let column_indexes: Option<ParquetColumnIndex> = 
column_indexes.map(|ovvi| {
-            ovvi.into_iter()
-                .map(|vi| {
-                    vi.into_iter()
-                        .map(|oi| oi.unwrap_or(ColumnIndexMetaData::NONE))
-                        .collect()
-                })
-                .collect()
-        });
-
-        // FIXME(ets): this will panic if there's a missing index.
-        let offset_indexes: Option<ParquetOffsetIndex> = 
offset_indexes.map(|ovvi| {
-            ovvi.into_iter()
-                .map(|vi| vi.into_iter().map(|oi| oi.unwrap()).collect())
-                .collect()
-        });
+        // test to see if all indexes for this file are empty
+        let all_none = column_indexes

Review Comment:
   True, it's a wall of code. I'll see if I can simplify this some.



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