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

Method BaseAggWinStream

src/jrd/recsrc/AggregatedStream.cpp:42–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

40
41template <typename ThisType, typename NextType>
42BaseAggWinStream<ThisType, NextType>::BaseAggWinStream(thread_db* tdbb, CompilerScratch* csb,
43 StreamType stream, const NestValueArray* group, MapNode* groupMap,
44 bool oneRowWhenEmpty, NextType* next)
45 : RecordStream(csb, stream),
46 m_next(next),
47 m_group(group),
48 m_groupMap(groupMap),
49 m_oneRowWhenEmpty(oneRowWhenEmpty)
50{
51 fb_assert(m_next);
52
53 m_impure = csb->allocImpure<typename ThisType::Impure>();
54
55 if (group)
56 {
57 m_cardinality = next->getCardinality();
58 for (auto count = group->getCount(); count; count--)
59 m_cardinality *= REDUCE_SELECTIVITY_FACTOR_EQUALITY;
60 }
61 else
62 m_cardinality = MINIMUM_CARDINALITY;
63}
64
65template <typename ThisType, typename NextType>
66void BaseAggWinStream<ThisType, NextType>::internalOpen(thread_db* tdbb) const

Callers

nothing calls this directly

Calls 2

getCardinalityMethod · 0.80
getCountMethod · 0.45

Tested by

no test coverage detected