MCPcopy Create free account
hub / github.com/bytedance/bolt / isAllNullVector

Function isAllNullVector

bolt/vector/ComplexVector.cpp:299–316  ·  view source on GitHub ↗

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.

Source from the content-addressed store, hash-verified

297// @return true if vector has only null values; false if vector may have
298// non-null values.
299bool 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
319void RowVector::copyRanges(

Callers 2

copyRangesMethod · 0.85
copyRangesImplMethod · 0.85

Calls 3

typeKindMethod · 0.45
isNullAtMethod · 0.45
wrappedVectorMethod · 0.45

Tested by

no test coverage detected