avamingli commented on code in PR #670:
URL: https://github.com/apache/cloudberry/pull/670#discussion_r1832596900
##########
src/backend/commands/explain_gp.c:
##########
@@ -1716,6 +1716,48 @@ cdbexplain_showExecStats(struct PlanState *planstate,
ExplainState *es)
}
pfree(extraData.data);
+ /*
+ * Print "Rows out"
+ */
+
+ if (gp_enable_explain_rows_out && es->analyze && ns->ninst > 0) {
+ double ntuples_max = ns->ntuples.vmax;
+ int ntuples_imax = ns->ntuples.imax;
+ double ntuples_min = ns->ntuples.vmin;
+ int ntuples_imin = ns->ntuples.imin;
+ double ntuples_avg = cdbexplain_agg_avg(&ns->ntuples);
+ int ntuples_cnt = ns->ntuples.vcnt;
+
+ if (es->format == EXPLAIN_FORMAT_TEXT)
+ {
+ /*
+ * create a header for all stats: separate each individual stat by
an
+ * underscore, separate the grouped stats for each node by a slash
+ */
+ appendStringInfoSpaces(es->str, es->indent * 2);
+ appendStringInfoString(es->str, "Rows out: ");
+
+ appendStringInfo(es->str,
+ "%.2f rows avg x %d workers, %.0f rows max
(seg%d), %.0f rows min (seg%d).\n",
+ ntuples_avg,
+ ntuples_cnt,
+ ntuples_max,
+ ntuples_imax,
+ ntuples_min,
+ ntuples_imin);
+ }
+ else {
+ // ExplainOpenGroup("Rows Out", NULL, false, es);
Review Comment:
Please remove unused codes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]