Skip to content

Commit f89e359

Browse files
committed
Fix Arrow 21 compatibility: use out-parameter FileReader::Make
Signed-off-by: Arham Chopra <arham.chopra@cubistsystematic.com>
1 parent 2ac4688 commit f89e359

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

cpp/csp/python/adapters/parquetadapterimpl.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -356,12 +356,13 @@ class NativeParquetStreamSource : public csp::adapters::parquet::RecordBatchStre
356356

357357
auto parquetReader = ::parquet::ParquetFileReader::Open( fileResult.ValueUnsafe() );
358358

359-
auto result = ::parquet::arrow::FileReader::Make(
360-
::arrow::default_memory_pool(), std::move( parquetReader ) );
361-
if( !result.ok() )
362-
CSP_THROW( csp::ValueError, "Failed to create Arrow FileReader for " << path << ": " << result.status().ToString() );
359+
std::unique_ptr<::parquet::arrow::FileReader> fileReader;
360+
auto status = ::parquet::arrow::FileReader::Make(
361+
::arrow::default_memory_pool(), std::move( parquetReader ), &fileReader );
362+
if( !status.ok() )
363+
CSP_THROW( csp::ValueError, "Failed to create Arrow FileReader for " << path << ": " << status.ToString() );
363364

364-
return std::move( result ).ValueUnsafe();
365+
return fileReader;
365366
}
366367

367368
static std::shared_ptr<::arrow::RecordBatchReader> getRecordBatchReader(

0 commit comments

Comments
 (0)