Runs quick checks to determine whether input vector has only null values. @return true if vector has only null values; false if vector may have non-null values.
| 297 | // @return true if vector has only null values; false if vector may have |
| 298 | // non-null values. |
| 299 | bool isAllNullVector(const BaseVector& vector) { |
| 300 | if (vector.typeKind() == TypeKind::UNKNOWN) { |
| 301 | return true; |
| 302 | } |
| 303 | |
| 304 | if (vector.isConstantEncoding()) { |
| 305 | return vector.isNullAt(0); |
| 306 | } |
| 307 | |
| 308 | auto leafVector = vector.wrappedVector(); |
| 309 | if (leafVector->isConstantEncoding()) { |
| 310 | // A null constant does not have a value vector, so wrappedVector |
| 311 | // returns the constant. |
| 312 | BOLT_CHECK(leafVector->isNullAt(0)); |
| 313 | return true; |
| 314 | } |
| 315 | return false; |
| 316 | } |
| 317 | } // namespace |
| 318 | |
| 319 | void RowVector::copyRanges( |
no test coverage detected