diff --git a/python/pyarrow/_parquet.pxd b/python/pyarrow/_parquet.pxd index 71e93ce0a4c51..c17c3b70d7f41 100644 --- a/python/pyarrow/_parquet.pxd +++ b/python/pyarrow/_parquet.pxd @@ -484,11 +484,9 @@ cdef extern from "parquet/arrow/reader.h" namespace "parquet::arrow" nogil: const vector[int]& column_indices, shared_ptr[CTable]* out) - CStatus GetRecordBatchReader(const vector[int]& row_group_indices, - const vector[int]& column_indices, - unique_ptr[CRecordBatchReader]* out) - CStatus GetRecordBatchReader(const vector[int]& row_group_indices, - unique_ptr[CRecordBatchReader]* out) + CResult[unique_ptr[CRecordBatchReader]] GetRecordBatchReader(const vector[int]& row_group_indices, + const vector[int]& column_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 a3abf1865b7b5..2fb1e41641f8e 100644 --- a/python/pyarrow/_parquet.pyx +++ b/python/pyarrow/_parquet.pyx @@ -1616,16 +1616,16 @@ cdef class ParquetReader(_Weakrefable): for index in column_indices: c_column_indices.push_back(index) with nogil: - check_status( + recordbatchreader = GetResultValue( self.reader.get().GetRecordBatchReader( - c_row_groups, c_column_indices, &recordbatchreader + c_row_groups, c_column_indices ) ) else: with nogil: - check_status( + recordbatchreader = GetResultValue( self.reader.get().GetRecordBatchReader( - c_row_groups, &recordbatchreader + c_row_groups ) ) diff --git a/python/pyarrow/src/arrow/python/python_test.cc b/python/pyarrow/src/arrow/python/python_test.cc index eea6bf9459d1f..f988f8da31cb1 100644 --- a/python/pyarrow/src/arrow/python/python_test.cc +++ b/python/pyarrow/src/arrow/python/python_test.cc @@ -663,7 +663,7 @@ Status TestDecimal128OverflowFails() { ASSERT_EQ(38, metadata.precision()); ASSERT_EQ(1, metadata.scale()); - auto type = ::arrow::decimal(38, 38); + auto type = ::arrow::smallest_decimal(38, 38); const auto& decimal_type = checked_cast(*type); ASSERT_RAISES(Invalid, internal::DecimalFromPythonDecimal(python_decimal, decimal_type, &value)); @@ -689,7 +689,7 @@ Status TestDecimal256OverflowFails() { ASSERT_EQ(76, metadata.precision()); ASSERT_EQ(1, metadata.scale()); - auto type = ::arrow::decimal(76, 76); + auto type = ::arrow::smallest_decimal(76, 76); const auto& decimal_type = checked_cast(*type); ASSERT_RAISES(Invalid, internal::DecimalFromPythonDecimal(python_decimal, decimal_type, &value));