corwinjoy commented on code in PR #39677:
URL: https://github.com/apache/arrow/pull/39677#discussion_r1456617027


##########
cpp/src/parquet/metadata.cc:
##########
@@ -826,6 +831,32 @@ class FileMetaData::FileMetaDataImpl {
     file_decryptor_ = std::move(file_decryptor);
   }
 
+  void set_column_offsets(const std::vector<std::shared_ptr<OffsetIndex>>& 
column_offsets, int64_t expected_num_rows) {
+    if (num_row_groups() != 1) {
+      throw ParquetException(
+              "This operation can only be applied to metadata with a single 
row group");
+    }
+
+    format::RowGroup& row_group = metadata_->row_groups[0];
+    int idx = 0;
+    for (format::ColumnChunk& chunk : row_group.columns) {
+      // Assume a chunk has only 1 page for now

Review Comment:
   I'm actually not quite sure how this should go when a ColumnChunk has 
multiple pages or if that is even possible.



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