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

Function compareMaterializedRowsLess

bolt/exec/tests/utils/QueryAssertions.cpp:1197–1222  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1195 return assertEqualResults(
1196 expectedRows,
1197 expectedType,
1198 materialize(actual),
1199 actualType,
1200 "Unexpected results");
1201}
1202
1203static bool compareMaterializedRowsLess(
1204 const MaterializedRowMultiset& less,
1205 const MaterializedRowMultiset& more) {
1206 if (less.size() != more.size())
1207 return false;
1208
1209 auto lessRow = less.begin();
1210 auto moreRow = more.begin();
1211 for (; lessRow != less.end() && moreRow != more.end(); lessRow++, moreRow++) {
1212 if (lessRow->size() != moreRow->size())
1213 return false;
1214
1215 auto lessCell = lessRow->begin();
1216 auto moreCell = moreRow->begin();
1217 for (; lessCell != lessRow->end() && moreCell != moreRow->end();
1218 lessCell++, moreCell++) {
1219 if (lessCell->kind() != moreCell->kind())
1220 return false;
1221
1222 if (moreCell->lessThanWithEpsilon(*lessCell))
1223 return false;
1224 }
1225 }

Callers 1

assertResultsBetweenFunction · 0.85

Calls 5

sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
kindMethod · 0.45
lessThanWithEpsilonMethod · 0.45

Tested by

no test coverage detected