liamzwbao commented on code in PR #8803:
URL: https://github.com/apache/arrow-rs/pull/8803#discussion_r2511600531
##########
arrow-array/src/array/list_array.rs:
##########
@@ -152,8 +152,8 @@ impl OffsetSizeTrait for i64 {
/// │ [D] │ │ (4,5) │ │ 1 │ │ 4 │ │ │ 0 │ │ ? │ │ 3
│
/// └─────────────┘ └───────┘ │ └───┘ ├───┤ ├───┤ ├───┤
/// │ 5 │ │ │ 1 │ │ D │ │ 4
│
-/// │ └───┘ ├───┤ ├───┤
-/// │ │ 0 │ │ ? │ │ 5
│
+/// │ └───┘ ╠═══╣ ╠═══╣
+/// │ ║ 0 ║ ║ ? ║ │ 5
│
Review Comment:
> > Fix the minor errors in the ListArray doc. slice(1, 3) should get
value(3) = Null and value(4) = D, so the value(5) is unused
>
> I think the diagram is actually correct -- the nullability of the
ListArray is defined by its own null mask (not the null mask of the child)
For slice(1, 3), the last list in the slice is list_array[3], which is [D].
However, the diagram also shows data coming from list_array[4][0] (the first
element of [NULL, F]), i.e. a Null at Values[5]. That element is outside the
sliced offsets range so I marked it as unused.
--
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]