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

Method isSorted

bolt/vector/ComplexVector.cpp:1144–1156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1142}
1143
1144bool MapVector::isSorted(vector_size_t index) const {
1145 if (isNullAt(index)) {
1146 return true;
1147 }
1148 auto offset = rawOffsets_[index];
1149 auto size = rawSizes_[index];
1150 for (auto i = 1; i < size; ++i) {
1151 if (keys_->compare(keys_.get(), offset + i - 1, offset + i) >= 0) {
1152 return false;
1153 }
1154 }
1155 return true;
1156}
1157
1158void MapVector::setType(const TypePtr& type) {
1159 BaseVector::setType(type);

Callers 5

canonicalizeMethod · 0.45
assertExtraMetadataFunction · 0.45
TEST_FFunction · 0.45
checkVectorFlagsSetTypedFunction · 0.45

Calls 3

isNullAtFunction · 0.70
compareMethod · 0.45
getMethod · 0.45

Tested by 4

assertExtraMetadataFunction · 0.36
TEST_FFunction · 0.36
checkVectorFlagsSetTypedFunction · 0.36