Skip to content

Commit dacec30

Browse files
authored
apacheGH-46871: [C++][Parquet] Restore implementation of 3 arrow::FileReader::GetRecordBatchReader() functions (apache#46868)
### Rationale for this change Those functions were accidentally removed in f7bc271 whereas only the variants using unique_ptr<> were intended for removal. ### What changes are included in this PR? Restore the implementation of 3 functions whose prototype is still available ### Are these changes tested? Apparently no ### Are there any user-facing changes? No (unbreak a unreleased regression) Cf apache#46867 (comment) for discussion * GitHub Issue: apache#46871 Authored-by: Even Rouault <[email protected]> Signed-off-by: AlenkaF <[email protected]>
1 parent b35e49f commit dacec30

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

cpp/src/parquet/arrow/reader.cc

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1310,6 +1310,28 @@ std::shared_ptr<RowGroupReader> FileReaderImpl::RowGroup(int row_group_index) {
13101310
// ----------------------------------------------------------------------
13111311
// Public factory functions
13121312

1313+
Status FileReader::GetRecordBatchReader(std::shared_ptr<RecordBatchReader>* out) {
1314+
ARROW_ASSIGN_OR_RAISE(auto tmp, GetRecordBatchReader());
1315+
out->reset(tmp.release());
1316+
return Status::OK();
1317+
}
1318+
1319+
Status FileReader::GetRecordBatchReader(const std::vector<int>& row_group_indices,
1320+
std::shared_ptr<RecordBatchReader>* out) {
1321+
ARROW_ASSIGN_OR_RAISE(auto tmp, GetRecordBatchReader(row_group_indices));
1322+
out->reset(tmp.release());
1323+
return Status::OK();
1324+
}
1325+
1326+
Status FileReader::GetRecordBatchReader(const std::vector<int>& row_group_indices,
1327+
const std::vector<int>& column_indices,
1328+
std::shared_ptr<RecordBatchReader>* out) {
1329+
ARROW_ASSIGN_OR_RAISE(auto tmp,
1330+
GetRecordBatchReader(row_group_indices, column_indices));
1331+
out->reset(tmp.release());
1332+
return Status::OK();
1333+
}
1334+
13131335
Status FileReader::Make(::arrow::MemoryPool* pool,
13141336
std::unique_ptr<ParquetFileReader> reader,
13151337
const ArrowReaderProperties& properties,

0 commit comments

Comments
 (0)