You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by zt...@apache.org on 2022/02/15 03:52:35 UTC

[hawq] branch ztao updated (3ae9cee -> ee9cdc9)

This is an automated email from the ASF dual-hosted git repository.

ztao1987 pushed a change to branch ztao
in repository https://gitbox.apache.org/repos/asf/hawq.git.


    from 3ae9cee  HAWQ-1828. rm should reject request when unavailable segment ratio exceeds rm_rejectrequest_nseg_limit
     new e76de34  HAWQ-1829. orc_enable_filter_pushdown should be dispatched to QE
     new ee9cdc9  HAWQ-1830. decorate the output of gp_enable_explain_allstat

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 src/backend/cdb/cdbexplain.c | 31 ++++++++++++++++++++++++++-----
 src/backend/utils/misc/guc.c |  2 +-
 2 files changed, 27 insertions(+), 6 deletions(-)

[hawq] 02/02: HAWQ-1830. decorate the output of gp_enable_explain_allstat

Posted by zt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ztao1987 pushed a commit to branch ztao
in repository https://gitbox.apache.org/repos/asf/hawq.git

commit ee9cdc9e2bfb91146a48c85ad6bfb21de332a41e
Author: ztao1987 <zh...@gmail.com>
AuthorDate: Tue Feb 15 11:51:55 2022 +0800

    HAWQ-1830. decorate the output of gp_enable_explain_allstat
---
 src/backend/cdb/cdbexplain.c | 31 ++++++++++++++++++++++++++-----
 1 file changed, 26 insertions(+), 5 deletions(-)

diff --git a/src/backend/cdb/cdbexplain.c b/src/backend/cdb/cdbexplain.c
index addae08..1ed3395 100644
--- a/src/backend/cdb/cdbexplain.c
+++ b/src/backend/cdb/cdbexplain.c
@@ -1242,12 +1242,30 @@ cdbexplain_depositStatsToNode(PlanState *planstate, CdbExplain_RecvStatCtx *ctx)
           );
         }
 
+        if (gp_enable_explain_allstat) {
+          StringInfoData *extratextbuf = ctx->extratextbuf;
+          if (rsi->bnotes < rsi->enotes)
+          {
+            /* Locate extra message text in dispatch result buffer. */
+            int         notelen = rsi->enotes - rsi->bnotes;
+            const char *notes = (const char *)rsh + rsh->bnotes + rsi->bnotes;
+
+            Insist(rsh->bnotes + rsi->enotes < rsh->enotes &&
+                   notes[notelen] == '\0');
+
+            /* Append to extratextbuf. */
+            nsi->bnotes = extratextbuf->len;
+            appendBinaryStringInfo(extratextbuf, notes, notelen);
+            nsi->enotes = extratextbuf->len;
+          }
+        }
+
         /*
          * Drop qExec's extra text.  We rescue it below if qExec is a winner.
          * For local qDisp slice, ctx->extratextbuf is NULL, which tells us to
          * leave the extra text undisturbed in its existing buffer.
          */
-        if (ctx->extratextbuf)
+        if (ctx->extratextbuf && !gp_enable_explain_allstat)
             nsi->bnotes = nsi->enotes = 0;
 
         if (nsi->running)
@@ -2095,7 +2113,7 @@ cdbexplain_showExecStats(struct PlanState              *planstate,
 		appendStringInfoString(str,
                                "allstat: "
         /*	 "seg_starttime_firststart_counter_firsttuple_startup_total_ntuples_nloops" */
-						       "seg_firststart_total_ntuples");
+						       "seg n_tuples start_offset timing_to_first_row timing_to_last_row n_loops\n");
 
         for (i = 0; i < ns->ninst; i++)
 		{
@@ -2110,16 +2128,19 @@ cdbexplain_showExecStats(struct PlanState              *planstate,
 			INSTR_TIME_SET_ZERO(timediff);
 	        INSTR_TIME_ACCUM_DIFF(timediff, nsi->firststart, ctx->querystarttime);
 	        cdbexplain_formatSeconds(startbuf, sizeof(startbuf), INSTR_TIME_GET_DOUBLE(timediff));
+			cdbexplain_formatSeconds(firstbuf, sizeof(firstbuf), nsi->firsttuple);
 			cdbexplain_formatSeconds(totalbuf, sizeof(totalbuf), nsi->total);
 
+			appendStringInfoFill(str, 2*indent + sizeof("allstat:"), ' ');
 			appendStringInfo(str,
-                             "/seg%d_%s_%s_%.0f",
+                             "seg%d rows_out %.0f, start_offset_by %s, %s to_first, %s to_end, in %.0f loop\n",
                              ns->segindex0 + i,
+							 nsi->ntuples,
 							 startbuf,
+							 firstbuf,
 							 totalbuf,
-                             nsi->ntuples);
+							 nsi->nloops);
 		}
-		appendStringInfoString(str, "//end\n");
 	}
 }                               /* cdbexplain_showExecStats */
 

[hawq] 01/02: HAWQ-1829. orc_enable_filter_pushdown should be dispatched to QE

Posted by zt...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

ztao1987 pushed a commit to branch ztao
in repository https://gitbox.apache.org/repos/asf/hawq.git

commit e76de34c2146f8c50d0ca3931ec62583e68840a4
Author: ztao1987 <zh...@gmail.com>
AuthorDate: Tue Feb 15 11:47:58 2022 +0800

    HAWQ-1829. orc_enable_filter_pushdown should be dispatched to QE
---
 src/backend/utils/misc/guc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c
index 723562b..2cf0c8a 100644
--- a/src/backend/utils/misc/guc.c
+++ b/src/backend/utils/misc/guc.c
@@ -7583,7 +7583,7 @@ static struct config_string ConfigureNamesString[] =
     {"orc_enable_filter_pushdown", PGC_USERSET, EXTERNAL_TABLES,
       gettext_noop("Enable filter pushdown for orc scan"),
       gettext_noop("Valid values are \"OFF\" and \"ON\"."),
-      GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL
+      GUC_NOT_IN_SAMPLE | GUC_NO_SHOW_ALL | GUC_GPDB_ADDOPT
     },
     &orc_enable_filter_pushdown,
     "ON", assign_switch_mode, NULL