kszucs commented on a change in pull request #7519: URL: https://github.com/apache/arrow/pull/7519#discussion_r447725569
########## File path: python/pyarrow/lib.pxd ########## @@ -179,101 +179,18 @@ cdef class Schema: cdef class Scalar: - cdef readonly: - DataType type - - -cdef class NAType(Scalar): - pass - - -cdef class ArrayValue(Scalar): cdef: - shared_ptr[CArray] sp_array - int64_t index - - cdef void init(self, DataType type, - const shared_ptr[CArray]& sp_array, int64_t index) - - cdef void _set_array(self, const shared_ptr[CArray]& sp_array) - -cdef class ScalarValue(Scalar): - cdef: - shared_ptr[CScalar] sp_scalar - - cdef void init(self, const shared_ptr[CScalar]& sp_scalar) - -cdef class Int8Value(ArrayValue): - pass + shared_ptr[CScalar] wrapped + cdef void init(self, const shared_ptr[CScalar]& wrapped) -cdef class Int64Value(ArrayValue): - pass - - -cdef class ListValue(ArrayValue): - cdef readonly: - DataType value_type - - cdef: - CListArray* ap - - cdef getitem(self, int64_t i) - cdef int64_t length(self) - - -cdef class LargeListValue(ArrayValue): - cdef readonly: - DataType value_type - - cdef: - CLargeListArray* ap - - cdef getitem(self, int64_t i) - cdef int64_t length(self) - - -cdef class MapValue(ArrayValue): - cdef readonly: - DataType key_type - DataType item_type - - cdef: - CMapArray* ap - - cdef getitem(self, int64_t i) - cdef int64_t length(self) - - -cdef class FixedSizeListValue(ArrayValue): - cdef readonly: - DataType value_type - - cdef: - CFixedSizeListArray* ap - - cdef getitem(self, int64_t i) - cdef int64_t length(self) - - -cdef class StructValue(ArrayValue): - cdef: - CStructArray* ap - - -cdef class UnionValue(ArrayValue): - cdef: - CUnionArray* ap - list value_types - - cdef getitem(self, int64_t i) - + @staticmethod + cdef wrap(const shared_ptr[CScalar]& wrapped) -cdef class StringValue(ArrayValue): - pass + cdef inline shared_ptr[CScalar] unwrap(self) nogil -cdef class FixedSizeBinaryValue(ArrayValue): +cdef class NAType(Scalar): Review comment: Forgot to rename it in the `.pxd` file. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org