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

Function isLazyNotLoaded

bolt/vector/BaseVector.cpp:799–820  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

797 vector_size_t size = indices->size() / sizeof(vector_size_t);
798 return wrapInDictionary(
799 BufferPtr(nullptr), std::move(indices), size, std::move(source));
800}
801
802bool isLazyNotLoaded(const BaseVector& vector) {
803 switch (vector.encoding()) {
804 case VectorEncoding::Simple::LAZY:
805 if (!vector.asUnchecked<LazyVector>()->isLoaded()) {
806 return true;
807 }
808
809 // Lazy Vectors may wrap lazy vectors (e.g. nested Rows) so we need to go
810 // deeper.
811 return isLazyNotLoaded(*vector.asUnchecked<LazyVector>()->loadedVector());
812 case VectorEncoding::Simple::DICTIONARY:
813 case VectorEncoding::Simple::SEQUENCE:
814 return isLazyNotLoaded(*vector.valueVector());
815 case VectorEncoding::Simple::CONSTANT:
816 return vector.valueVector() ? isLazyNotLoaded(*vector.valueVector())
817 : false;
818 case VectorEncoding::Simple::ROW:
819 return vector.asUnchecked<RowVector>()->containsLazyNotLoaded();
820 default:
821 return false;
822 }
823}

Callers 15

setInternalStateMethod · 0.85
setInternalStateMethod · 0.85
estimateFlatSizeMethod · 0.85
loadedVectorMethod · 0.85
decodeMethod · 0.85
ensureLoadedRowsMethod · 0.85
ensureLoadedRowsImplMethod · 0.85
TEST_FFunction · 0.85
TEST_FFunction · 0.85
ensureLoadedMethod · 0.85

Calls 4

isLoadedMethod · 0.80
containsLazyNotLoadedMethod · 0.80
encodingMethod · 0.45
loadedVectorMethod · 0.45

Tested by 3

TEST_FFunction · 0.68
TEST_FFunction · 0.68