huberylee commented on code in PR #39393:
URL: https://github.com/apache/arrow/pull/39393#discussion_r1446062240


##########
cpp/src/parquet/arrow/reader.cc:
##########
@@ -157,6 +159,13 @@ class FileReaderImpl : public FileReader {
     };
   }
 
+  FileColumnIteratorFactory SomeRowGroupsFactory(std::vector<int> row_groups,

Review Comment:
   > I'd suggest to use interface below:
   > 
   > ```
   > FileColumnIteratorFactory SomeRowGroupsFactory(std::map<int, RowRanges> 
ranges);
   > ```
   > 
   > In this way, `GetFieldReader` and `GetFieldReaders` can be changed without 
adding extra optional parameter.
   > 
   > ```
   >   // RowGroups can be either std::vector<int> or std::map<int, RowRanges>
   >   template <typename RowGroups>
   >   Status GetFieldReader(int i,
   >                         const std::shared_ptr<std::unordered_set<int>>& 
included_leaves,
   >                         const RowGroups& row_groups,
   >                         std::unique_ptr<ColumnReaderImpl>* out)
   > 
   >   template <typename RowGroups>
   >   Status GetFieldReaders(const std::vector<int>& column_indices,
   >                          const RowGroups& row_groups,
   >                          std::vector<std::shared_ptr<ColumnReaderImpl>>* 
out,
   >                          std::shared_ptr<::arrow::Schema>* out_schema)
   > ```
   
   If the interface requires all row groups to provide ranges information, we 
can do this change.



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