MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / matchSubset

Function matchSubset

src/jrd/optimizer/Retrieval.cpp:84–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82 }
83
84 bool matchSubset(const BoolExprNode* boolean, const BoolExprNode* sub)
85 {
86 if (boolean->sameAs(sub, true))
87 return true;
88
89 auto binaryNode = nodeAs<BinaryBoolNode>(boolean);
90 if (binaryNode && binaryNode->blrOp == blr_or)
91 {
92 if (matchSubset(binaryNode->arg1, sub) ||
93 matchSubset(binaryNode->arg2, sub))
94 {
95 return true;
96 }
97
98 binaryNode = nodeAs<BinaryBoolNode>(sub);
99 if (binaryNode && binaryNode->blrOp == blr_or)
100 {
101 if (matchSubset(boolean, binaryNode->arg1) &&
102 matchSubset(boolean, binaryNode->arg2))
103 {
104 return true;
105 }
106 }
107 }
108
109 return false;
110 };
111
112} // namespace
113

Callers 1

checkIndexConditionMethod · 0.85

Calls 1

sameAsMethod · 0.45

Tested by

no test coverage detected