Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
0.9.0
-
None
Description
Hi, not sure if this is a bug or if I misinterpret the spec. According to the latter, "Arrays having a 0 null count may choose to not allocate the null bitmap". From this I'd infer that the statement also holds in the other direction, i.e. non-allocated bitmaps imply a 0 null count. This would mean that if a bitmap is not allocated, IsValid() should always return true. But at the moment it's doing this:
bool IsNull(int64_t i) const { return null_bitmap_data_ != NULLPTR && BitUtil::BitNotSet(null_bitmap_data_, i + data_->offset); } bool IsValid(int64_t i) const { return null_bitmap_data_ != NULLPTR && BitUtil::GetBit(null_bitmap_data_, i + data_->offset); }
Which leads to a situation where in the case of non-allocated bitmaps values are neither Null nor Valid. Shouldn't it rather be:
bool IsValid(int64_t i) const { return null_bitmap_data_ == NULLPTR || BitUtil::GetBit(null_bitmap_data_, i + data_->offset); }
?
Attachments
Issue Links
- is superceded by
-
ARROW-2641 [C++] Investigate spurious memset() calls
- Resolved