alamb commented on code in PR #2327:
URL: https://github.com/apache/arrow-rs/pull/2327#discussion_r938724839
##########
arrow/src/compute/util.rs:
##########
@@ -351,9 +351,7 @@ pub(super) mod tests {
T: ArrowPrimitiveType,
PrimitiveArray<T>: From<Vec<Option<T::Native>>>,
{
- use std::any::TypeId;
-
- let mut offset = vec![0];
+ let mut offset = vec![S::zero()];
Review Comment:
👍
##########
arrow/src/array/array_list.rs:
##########
@@ -57,6 +60,16 @@ pub struct GenericListArray<OffsetSize> {
}
impl<OffsetSize: OffsetSizeTrait> GenericListArray<OffsetSize> {
+ /// The data type constructor of list array.
+ /// The input is the schema of the child array and
+ /// the output is the [`DataType`], List or LargeList.
+ pub const DATA_TYPE_CONSTRUCTOR: fn(Box<Field>) -> DataType = if
OffsetSize::IS_LARGE
Review Comment:
```suggestion
pub const MAKE_DATA_TYPE: fn(Box<Field>) -> DataType = if
OffsetSize::IS_LARGE
```
`DATA_TYPE_CONSTRUCTOR` was somewhat hard on my eyes when reading this PR.
That being said while I might prefer something like `MAKE_DATA_TYPE` it is only
an opinion for your consideration
--
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]