viirya commented on code in PR #50430:
URL: https://github.com/apache/arrow/pull/50430#discussion_r3631437267
##########
python/pyarrow/array.pxi:
##########
@@ -2444,6 +2454,12 @@ cdef class BooleanArray(Array):
"""
Concrete class for Arrow arrays of boolean data type.
"""
+
+ cdef object _getitem_py(self, int64_t i, object maps_as_pydicts):
+ if self.ap.IsNull(i):
+ return None
+ return (<CBooleanArray*> self.ap).Value(i)
+
Review Comment:
Fixed in 95f29b9b5b on the base PR #50327 — and swept the whole family this
time rather than just the flagged instances: `IsNull` (used by every
`_getitem_py` null check), all numeric/temporal `Value()`,
binary/fixed-size-binary `GetValue()`, `GetString()` and decimal
`FormatValue()` now take `int64_t`, matching the C++ headers. The remaining
`int` parameters in the file are field/column/chunk indices, which are `int` in
C++ as well.
##########
python/pyarrow/includes/libarrow.pxd:
##########
@@ -941,18 +941,20 @@ cdef extern from "arrow/api.h" namespace "arrow" nogil:
const vector[c_string]& field_names,
const vector[int8_t]& type_codes)
- int32_t value_offset(int i)
+ int32_t value_offset(int64_t i)
shared_ptr[CBuffer] value_offsets()
cdef cppclass CBinaryArray" arrow::BinaryArray"(CArray):
const uint8_t* GetValue(int i, int32_t* length)
Review Comment:
Fixed in 95f29b9b5b (see the sibling thread — the whole accessor family is
aligned now).
##########
python/pyarrow/includes/libarrow.pxd:
##########
@@ -941,18 +941,20 @@ cdef extern from "arrow/api.h" namespace "arrow" nogil:
const vector[c_string]& field_names,
const vector[int8_t]& type_codes)
- int32_t value_offset(int i)
+ int32_t value_offset(int64_t i)
shared_ptr[CBuffer] value_offsets()
cdef cppclass CBinaryArray" arrow::BinaryArray"(CArray):
const uint8_t* GetValue(int i, int32_t* length)
+ cpp_string_view GetView(int64_t i)
shared_ptr[CBuffer] value_data()
int32_t value_offset(int64_t i)
int32_t value_length(int64_t i)
int32_t total_values_length()
cdef cppclass CLargeBinaryArray" arrow::LargeBinaryArray"(CArray):
const uint8_t* GetValue(int i, int64_t* length)
Review Comment:
Fixed in 95f29b9b5b (same sweep).
--
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]