MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / countOpsWithType

Method countOpsWithType

test/planner/cardinality_test.cpp:39–45  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37 return getOpWithType(op->getChild(0).get(), type);
38 }
39 uint64_t countOpsWithType(planner::LogicalOperator* op, planner::LogicalOperatorType type) {
40 auto result = op->getOperatorType() == type ? 1u : 0u;
41 for (auto i = 0u; i < op->getNumChildren(); ++i) {
42 result += countOpsWithType(op->getChild(i).get(), type);
43 }
44 return result;
45 }
46};
47
48TEST_F(CardinalityTest, TestOperators) {

Callers

nothing calls this directly

Calls 3

getNumChildrenMethod · 0.80
getMethod · 0.45
getChildMethod · 0.45

Tested by

no test coverage detected