Checks if bits in specified positions are all set, all unset or mixed.
| 35 | |
| 36 | /// Checks if bits in specified positions are all set, all unset or mixed. |
| 37 | BooleanMix refineBooleanMixNonNull( |
| 38 | const uint64_t* bits, |
| 39 | const SelectivityVector& rows) { |
| 40 | int32_t first = bits::findFirstBit(bits, rows.begin(), rows.end()); |
| 41 | if (first < 0) { |
| 42 | return BooleanMix::kAllFalse; |
| 43 | } |
| 44 | if (first == rows.begin() && bits::isAllSet(bits, rows.begin(), rows.end())) { |
| 45 | return BooleanMix::kAllTrue; |
| 46 | } |
| 47 | return BooleanMix::kMixNonNull; |
| 48 | } |
| 49 | } // namespace |
| 50 | |
| 51 | // Return a BooleanMix representing the status of boolean values in vector. If |
no test coverage detected