raulcd commented on code in PR #44819:
URL: https://github.com/apache/arrow/pull/44819#discussion_r1856203717
##########
cpp/src/parquet/arrow/reader.cc:
##########
@@ -1315,15 +1315,15 @@ Status FileReader::GetRecordBatchReader(const
std::vector<int>& row_group_indice
return Status::OK();
}
-Status FileReader::Make(::arrow::MemoryPool* pool,
+Result<std::unique_ptr<FileReader>> Make(::arrow::MemoryPool* pool,
std::unique_ptr<ParquetFileReader> reader,
const ArrowReaderProperties& properties,
std::unique_ptr<FileReader>* out) {
Review Comment:
`std::unique_ptr<FileReader>* out` should be removed as part of the
signature of the function. The Result already contains the `FileReader` value
so this is unnecessary. See this commit with a similar change for an example:
https://github.com/apache/arrow/commit/0cdbdac413fa1e7acaf0362eb8ca8fd1911d2a9e
##########
cpp/src/parquet/arrow/reader.cc:
##########
@@ -1315,15 +1315,15 @@ Status FileReader::GetRecordBatchReader(const
std::vector<int>& row_group_indice
return Status::OK();
}
-Status FileReader::Make(::arrow::MemoryPool* pool,
+Result<std::unique_ptr<FileReader>> Make(::arrow::MemoryPool* pool,
std::unique_ptr<ParquetFileReader> reader,
const ArrowReaderProperties& properties,
std::unique_ptr<FileReader>* out) {
*out = std::make_unique<FileReaderImpl>(pool, std::move(reader), properties);
return static_cast<FileReaderImpl*>(out->get())->Init();
}
-Status FileReader::Make(::arrow::MemoryPool* pool,
+Result<std::unique_ptr<FileReader>> Make(::arrow::MemoryPool* pool,
Review Comment:
You still have to provide the implementations for `Status FileReader`
because they are part of the headers file. Even though they are deprecated you
can't remove them.
--
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]