You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Array's method IsNull() and IsValid() is implemented as follows:
/// \brief Return true if value at index is null. Does not boundscheckboolIsNull(int64_t i) const {
return null_bitmap_data_ != NULLPTR &&
!BitUtil::GetBit(null_bitmap_data_, i + data_->offset);
}
/// \brief Return true if value at index is valid (not null). Does not/// boundscheckboolIsValid(int64_t i) const {
return null_bitmap_data_ == NULLPTR ||
BitUtil::GetBit(null_bitmap_data_, i + data_->offset);
}
According to the doc, "Arrays having a 0 null count may choose to not allocate the null bitmap". But a null type array doesn't have a null bitmap. So for a null type array, IsNull() always returns false, IsValid() always returns true.
If this is by design, maybe additional comments and docs should be added.
I'm not sure if this is a bug or by design.
Array's method
IsNull()
andIsValid()
is implemented as follows:According to the doc, "Arrays having a 0 null count may choose to not allocate the null bitmap". But a null type array doesn't have a null bitmap. So for a null type array,
IsNull()
always returns false,IsValid()
always returns true.If this is by design, maybe additional comments and docs should be added.
Reporter: Chenxi Li / @Crystrix
Assignee: Nate Clark / @n3world
Related issues:
PRs and other links:
Note: This issue was originally created as ARROW-12804. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: