You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "AlenkaF (via GitHub)" <gi...@apache.org> on 2023/06/06 04:35:32 UTC
[GitHub] [arrow] AlenkaF commented on a diff in pull request #35865: GH-35740: Add documentation for list arrays' values property
AlenkaF commented on code in PR #35865:
URL: https://github.com/apache/arrow/pull/35865#discussion_r1218861594
##########
python/pyarrow/array.pxi:
##########
@@ -2053,6 +2053,38 @@ cdef class ListArray(BaseListArray):
@property
def values(self):
+ """
+ Return the underlying array of values which backs the ListArray.
+
+ This is logically a concatenation of all the sub-lists in this array.
+
+ Note even null values are included. If any of the list slots
+ are null, but are backed by a non-empty sub-list, those values
+ will be included in the output.
+
+ Compare with ``flatten``, which returns only the non-null
+ values.
Review Comment:
```suggestion
values taking into consideration array’s offsets.
```
Same for LargeListArray ...
##########
python/pyarrow/array.pxi:
##########
@@ -2053,6 +2053,38 @@ cdef class ListArray(BaseListArray):
@property
def values(self):
+ """
+ Return the underlying array of values which backs the ListArray.
Review Comment:
```suggestion
Return the underlying array of values which backs the ListArray
ignoring array’s offsets.
```
Same for LargeListArray ...
##########
python/pyarrow/array.pxi:
##########
@@ -2296,6 +2362,40 @@ cdef class FixedSizeListArray(BaseListArray):
@property
def values(self):
+ """
+ Return the underlying array of values which backs the
+ FixedSizeListArray.
+
+ This is logically a concatenation of all the sub-lists in this array.
+
+ Note even null values are included.
Review Comment:
```suggestion
Note even null elements are included.
```
##########
python/pyarrow/array.pxi:
##########
@@ -2140,6 +2172,40 @@ cdef class LargeListArray(BaseListArray):
@property
def values(self):
+ """
+ Return the underlying array of values which backs the LargeListArray.
+
+ This is logically a concatenation of all the sub-lists in this array.
+
+ Note even null values are included. If any of the list slots
+ are null, but are backed by a non-empty sub-list, those values
+ will be included in the output.
Review Comment:
```suggestion
If any of the list elements are null, but backed by a non-empty sub-list,
those elements will be included in the output.
```
Same for ListArray ..
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org