emkornfield commented on a change in pull request #7704:
URL: https://github.com/apache/arrow/pull/7704#discussion_r453149597



##########
File path: cpp/src/parquet/arrow/reader.cc
##########
@@ -301,62 +302,50 @@ class FileReaderImpl : public FileReader {
 
 class RowGroupRecordBatchReader : public ::arrow::RecordBatchReader {
  public:
-  RowGroupRecordBatchReader(std::vector<std::unique_ptr<ColumnReaderImpl>> 
field_readers,
-                            std::shared_ptr<::arrow::Schema> schema, int64_t 
batch_size)
-      : field_readers_(std::move(field_readers)),
-        schema_(std::move(schema)),
-        batch_size_(batch_size) {}
-
   ~RowGroupRecordBatchReader() override {}
 
   std::shared_ptr<::arrow::Schema> schema() const override { return schema_; }
 
-  static Status Make(const std::vector<int>& row_groups,
-                     const std::vector<int>& column_indices, FileReaderImpl* 
reader,
-                     int64_t batch_size,
-                     std::unique_ptr<::arrow::RecordBatchReader>* out) {
-    std::vector<int> field_indices;
-    if (!reader->manifest_.GetFieldIndices(column_indices, &field_indices)) {
-      return Status::Invalid("Invalid column index");
-    }
+  static ::arrow::Result<std::unique_ptr<RowGroupRecordBatchReader>> Make(
+      const std::vector<int>& row_group_indices, const std::vector<int>& 
column_indices,
+      int64_t batch_size, FileReaderImpl* reader) {
+    std::unique_ptr<RowGroupRecordBatchReader> out(new 
RowGroupRecordBatchReader);

Review comment:
       *rant* it annoys me that that make_unique can't access private 
constructors.
   nit: please construct using empty parens at the end.
   




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

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to