| 310 | } |
| 311 | |
| 312 | bool OptionalBitmapEquals(const uint8_t* left, int64_t left_offset, const uint8_t* right, |
| 313 | int64_t right_offset, int64_t length) { |
| 314 | if (left == nullptr && right == nullptr) { |
| 315 | return true; |
| 316 | } else if (left != nullptr && right != nullptr) { |
| 317 | return BitmapEquals(left, left_offset, right, right_offset, length); |
| 318 | } else if (left != nullptr) { |
| 319 | return CountSetBits(left, left_offset, length) == length; |
| 320 | } else { |
| 321 | return CountSetBits(right, right_offset, length) == length; |
| 322 | } |
| 323 | } |
| 324 | |
| 325 | bool OptionalBitmapEquals(const std::shared_ptr<Buffer>& left, int64_t left_offset, |
| 326 | const std::shared_ptr<Buffer>& right, int64_t right_offset, |
no test coverage detected