You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "Ziy1-Tan (via GitHub)" <gi...@apache.org> on 2025/07/01 13:36:53 UTC

Re: [PR] GH-46869: [C++][Parquet] Add `arrow::Result` version of `parquet::arrow::FileReader::GetRecordBatchReader()` [arrow]

Ziy1-Tan commented on code in PR #46932:
URL: https://github.com/apache/arrow/pull/46932#discussion_r2177630274


##########
cpp/src/parquet/arrow/reader.h:
##########
@@ -191,13 +191,53 @@ class PARQUET_EXPORT FileReader {
   ///
   /// \returns error Status if either row_group_indices or column_indices
   ///     contains an invalid index
+  /// \deprecated Deprecated in future release. Use arrow::Result version instead.
+  ARROW_DEPRECATED("Deprecated in future release. Use arrow::Result version instead.")
   ::arrow::Status GetRecordBatchReader(const std::vector<int>& row_group_indices,
                                        const std::vector<int>& column_indices,
                                        std::shared_ptr<::arrow::RecordBatchReader>* out);
+
+  /// \brief Return a RecordBatchReader of row groups selected from
+  /// row_group_indices, whose columns are selected by column_indices.
+  ///
+  /// Note that the ordering in row_group_indices and column_indices
+  /// matter. FileReaders must outlive their RecordBatchReaders.
+  ///
+  /// \param row_group_indices which row groups to read (order determines read order).
+  /// \param column_indices which columns to read (order determines output schema).
+  ///
+  /// \returns error Result if either row_group_indices or column_indices
+  ///     contains an invalid index
+  virtual ::arrow::Result<std::shared_ptr<::arrow::RecordBatchReader>>
+  GetRecordBatchReaderSharedPtr(const std::vector<int>& row_group_indices,

Review Comment:
   `GetRecordBatchReader` is used by `Result<std::unique_ptr<RecordBatchReader>> GetRecordBatchReader`. @wgtmac, Do you have better nameing of this?



-- 
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: github-unsubscribe@arrow.apache.org

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