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

Method generateResidualBoolean

src/jrd/optimizer/Optimizer.cpp:2986–3004  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2984//
2985
2986RecordSource* Optimizer::generateResidualBoolean(RecordSource* rsb)
2987{
2988 BoolExprNode* boolean = nullptr;
2989 double selectivity = MAXIMUM_SELECTIVITY;
2990
2991 for (auto iter = getBaseConjuncts(); iter.hasData(); ++iter)
2992 {
2993 if (!(iter & CONJUNCT_USED))
2994 {
2995 compose(getPool(), &boolean, iter);
2996 iter |= CONJUNCT_USED;
2997
2998 if (!(iter & (CONJUNCT_MATCHED | CONJUNCT_JOINED)))
2999 selectivity *= getSelectivity(*iter);
3000 }
3001 }
3002
3003 return boolean ? FB_NEW_POOL(getPool()) FilteredStream(csb, rsb, boolean, selectivity) : rsb;
3004}
3005
3006
3007//

Callers

nothing calls this directly

Calls 3

composeFunction · 0.85
FilteredStreamClass · 0.85
hasDataMethod · 0.45

Tested by

no test coverage detected