You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "findepi (via GitHub)" <gi...@apache.org> on 2025/09/03 09:54:00 UTC
Re: [PR] Docs: Clarify that Array::value does not check for nulls [arrow-rs]
findepi commented on code in PR #8065:
URL: https://github.com/apache/arrow-rs/pull/8065#discussion_r2318426348
##########
arrow-array/src/array/boolean_array.rs:
##########
@@ -178,13 +178,20 @@ impl BooleanArray {
/// Returns the boolean value at index `i`.
///
+ /// Note: This method does not check for nulls and the value is arbitrary
+ /// if [`is_null`](Self::is_null) returns true for the index.
Review Comment:
Here and in other places, is it guaranteed not to panic?
##########
arrow-array/src/array/byte_array.rs:
##########
@@ -276,6 +276,10 @@ impl<T: ByteArrayType> GenericByteArray<T> {
}
/// Returns the element at index `i`
+ ///
+ /// Note: This method does not check for nulls and the value is arbitrary
+ /// if [`is_null`](Self::is_null) returns true for the index.
Review Comment:
Here and in other places, is it guaranteed not to panic and return a valid `T::Native` value corresponding to type `T` (in (theoretical?) case `T::Native` could represent some values not valid for `T`)
##########
arrow-array/src/array/fixed_size_list_array.rs:
##########
@@ -243,6 +243,12 @@ impl FixedSizeListArray {
}
/// Returns ith value of this list array.
+ ///
+ /// Note: This method does not check for nulls and the value is arbitrary
+ /// (but still well-defined) if [`is_null`](Self::is_null) returns true for the index.
Review Comment:
> but still well-defined
should this be construed as meaning the returned value is of size L, if self is a FixedSizeList(L)?
--
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