MCPcopy Create free account
hub / github.com/apache/cloudberry / cdbexplain_agg_upd

Function cdbexplain_agg_upd

src/include/cdb/cdbexplain.h:43–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

41}
42
43static inline bool
44cdbexplain_agg_upd(CdbExplain_Agg *agg, double v, int id)
45{
46 if (v > 0)
47 {
48 agg->vsum += v;
49 agg->vcnt++;
50
51 if (v > agg->vmax ||
52 agg->vcnt == 1)
53 {
54 agg->vmax = v;
55 agg->imax = id;
56 return true;
57 }
58 }
59 return false;
60}
61
62static inline double
63cdbexplain_agg_avg(CdbExplain_Agg *agg)

Callers 4

Calls

no outgoing calls

Tested by

no test coverage detected