Also changed the python wrapper.

This commit is contained in:
Zhuo Peng authored and Antoine Pitrou committed 2019-12-18 11:53:06 +01:00
1 parent a3d4d2fbba
commit 3c8746241b
2 files changed
+8 -4

No files matched your search

+6 -4
View File
@@ -1308,7 +1308,8 @@ cdef class ListArray(Array):
@property
def values(self):
return self.flatten()
cdef CListArray* arr = <CListArray*> self.ap
return pyarrow_wrap_array(arr.values())
@property
def offsets(self):
@@ -1328,7 +1329,7 @@ cdef class ListArray(Array):
result : Array
"""
cdef CListArray* arr = <CListArray*> self.ap
return pyarrow_wrap_array(arr.values())
return pyarrow_wrap_array(arr.Flatten())
cdef class LargeListArray(Array):
@@ -1369,7 +1370,8 @@ cdef class LargeListArray(Array):
@property
def values(self):
return self.flatten()
cdef CLargeListArray* arr = <CLargeListArray*> self.ap
return pyarrow_wrap_array(arr.values())
@property
def offsets(self):
@@ -1389,7 +1391,7 @@ cdef class LargeListArray(Array):
result : Array
"""
cdef CLargeListArray* arr = <CLargeListArray*> self.ap
return pyarrow_wrap_array(arr.values())
return pyarrow_wrap_array(arr.Flatten())
cdef class MapArray(Array):
+2
View File
@@ -475,6 +475,7 @@ cdef extern from "arrow/api.h" namespace "arrow" nogil:
int32_t value_offset(int i)
int32_t value_length(int i)
shared_ptr[CArray] values()
shared_ptr[CArray] Flatten()
shared_ptr[CDataType] value_type()
cdef cppclass CLargeListArray" arrow::LargeListArray"(CArray):
@@ -495,6 +496,7 @@ cdef extern from "arrow/api.h" namespace "arrow" nogil:
int64_t value_offset(int i)
int64_t value_length(int i)
shared_ptr[CArray] values()
shared_ptr[CArray] Flatten()
shared_ptr[CDataType] value_type()
cdef cppclass CMapArray" arrow::MapArray"(CArray):