From f292cc101be901b98b0d9357db5b564efee76de7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ra=C3=BAl=20Cumplido?= Date: Wed, 8 Jan 2025 10:44:47 +0100 Subject: [PATCH] Revert to unique_ptr as returned from C++ --- python/pyarrow/_parquet.pxd | 4 ++-- python/pyarrow/_parquet.pyx | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/python/pyarrow/_parquet.pxd b/python/pyarrow/_parquet.pxd index 0ac8b892c5bd4..ceb0222319456 100644 --- a/python/pyarrow/_parquet.pxd +++ b/python/pyarrow/_parquet.pxd @@ -484,9 +484,9 @@ cdef extern from "parquet/arrow/reader.h" namespace "parquet::arrow" nogil: const vector[int]& column_indices, shared_ptr[CTable]* out) - CResult[shared_ptr[CRecordBatchReader]] GetRecordBatchReader(const vector[int]& row_group_indices, + CResult[unique_ptr[CRecordBatchReader]] GetRecordBatchReader(const vector[int]& row_group_indices, const vector[int]& column_indices) - CResult[shared_ptr[CRecordBatchReader]] GetRecordBatchReader(const vector[int]& row_group_indices) + CResult[unique_ptr[CRecordBatchReader]] GetRecordBatchReader(const vector[int]& row_group_indices) CStatus ReadTable(shared_ptr[CTable]* out) CStatus ReadTable(const vector[int]& column_indices, diff --git a/python/pyarrow/_parquet.pyx b/python/pyarrow/_parquet.pyx index 2770fb57aefd1..2fb1e41641f8e 100644 --- a/python/pyarrow/_parquet.pyx +++ b/python/pyarrow/_parquet.pyx @@ -1602,7 +1602,7 @@ cdef class ParquetReader(_Weakrefable): vector[int] c_row_groups vector[int] c_column_indices shared_ptr[CRecordBatch] record_batch - SharedPtrNoGIL[CRecordBatchReader] recordbatchreader + UniquePtrNoGIL[CRecordBatchReader] recordbatchreader self.set_batch_size(batch_size)