MCPcopy Create free account
hub / github.com/ByConity/ByConity / hasDifferentStructureInPrefix

Function hasDifferentStructureInPrefix

src/DataTypes/ObjectUtils.cpp:283–293  ·  view source on GitHub ↗

Returns true if there exists a prefix with matched names, but not matched structure (is Nested, number of dimensions).

Source from the content-addressed store, hash-verified

281/// Returns true if there exists a prefix with matched names,
282/// but not matched structure (is Nested, number of dimensions).
283static bool hasDifferentStructureInPrefix(const PathInData::Parts & lhs, const PathInData::Parts & rhs)
284{
285 for (size_t i = 0; i < std::min(lhs.size(), rhs.size()); ++i)
286 {
287 if (lhs[i].key != rhs[i].key)
288 return false;
289 else if (lhs[i] != rhs[i])
290 return true;
291 }
292 return false;
293}
294
295void checkObjectHasNoAmbiguousPaths(const PathsInData & paths)
296{

Callers 1

Calls 2

minFunction · 0.70
sizeMethod · 0.45

Tested by

no test coverage detected