jorgecarleitao commented on a change in pull request #474:
URL: https://github.com/apache/arrow-rs/pull/474#discussion_r656116469
##########
File path: arrow/src/array/array_list.rs
##########
@@ -50,6 +50,9 @@ impl OffsetSizeTrait for i64 {
}
}
+/// Generic struct for a primitive Array
+///
+/// Instead of using `GenericListArray` directly, consider using `ListArray`
or `LargeListArray`
Review comment:
I am sorry I was not very explicit. :(
The example is great, I would just omit the
> Instead of using `GenericListArray` directly, consider using [`ListArray`]
or [`LargeListArray`]`
which suggests that using `ListArray` is better than using
`GenericListArray`, when imo we do not have enough information here to make
this recommendation. In general using `GenericListArray` is better because it
allows to write things like
```
fn some_f<O: ListOffset>(array: &GenericListArray<O>)
```
which makes it generic over both "ListArray" and "LargeListArray". Most code
in arrow and DataFusion uses this to reduce code duplication while supporting
both.
--
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:
[email protected]