hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hubertzh...@apache.org
Subject [2/5] incubator-hawq git commit: Revert "HAWQ-673. Unify out put of explain analyze."
Date Thu, 14 Apr 2016 08:01:26 GMT
Revert "HAWQ-673. Unify out put of explain analyze."

This reverts commit cbf85995d93b04c9f2d41a83c0afac2639f21297.


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq/commit/b802bf67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq/tree/b802bf67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq/diff/b802bf67

Branch: refs/heads/master
Commit: b802bf6789badbc70b1e9cbe79242ae78c07d861
Parents: f786bb8
Author: hzhang2 <zhanghuan929@163.com>
Authored: Thu Apr 14 15:51:19 2016 +0800
Committer: hzhang2 <zhanghuan929@163.com>
Committed: Thu Apr 14 15:51:19 2016 +0800

----------------------------------------------------------------------
 src/backend/cdb/cdbexplain.c |  6 ++----
 src/include/cdb/cdbexplain.h | 14 ++------------
 2 files changed, 4 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b802bf67/src/backend/cdb/cdbexplain.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbexplain.c b/src/backend/cdb/cdbexplain.c
index f20a7e5..6ddb095 100644
--- a/src/backend/cdb/cdbexplain.c
+++ b/src/backend/cdb/cdbexplain.c
@@ -305,8 +305,6 @@ cdbexplain_localExecStats(struct PlanState                 *planstate,
     ctx.send.notebuf = &showstatctx->extratextbuf;
 
     /* Set up a temporary StatHdr for both collecting and depositing stats. */
-    gethostname(ctx.send.hdr.hostname,SEGMENT_IDENTITY_NAME_LENGTH-1);
-    //strncpy(ctx.send.hdr.hostname,gethostname(),SEGMENT_IDENTITY_NAME_LENGTH-1);
     ctx.msgptrs[0] = &ctx.send.hdr;
     ctx.send.hdr.segindex = GetQEIndex();
     ctx.send.hdr.nInst = 1;
@@ -923,7 +921,7 @@ cdbexplain_depStatAcc_upd(CdbExplain_DepStatAcc    *acc,
         acc->nsimax = nsi;
     }
 
-    if (acc->max_total <= nsi->total)
+    if (acc->max_total < nsi->total)
     {
 		acc->rshLast = rsh;
 		acc->rsiLast = rsi;
@@ -1426,7 +1424,7 @@ cdbexplain_formatSegNoParenthesis(char *outbuf, int bufsize, int segindex,
int n
 	Assert(outbuf != NULL &&  "CDBEXPLAIN: char buffer is null");
 	Assert(bufsize > 0 &&  "CDBEXPLAIN: size of char buffer is zero");
 
-    if ( nInst >= 0 && segindex >= -1){
+    if ( nInst >= 0 && segindex >= 0){
     	/*check if truncation occurs */
 #ifdef USE_ASSERT_CHECKING
     	int nchars_written =

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/b802bf67/src/include/cdb/cdbexplain.h
----------------------------------------------------------------------
diff --git a/src/include/cdb/cdbexplain.h b/src/include/cdb/cdbexplain.h
index 719eb38..8dde233 100644
--- a/src/include/cdb/cdbexplain.h
+++ b/src/include/cdb/cdbexplain.h
@@ -74,22 +74,12 @@ cdbexplain_agg_init1(CdbExplain_Agg *agg, double v, int id)
 static inline bool
 cdbexplain_agg_upd(CdbExplain_Agg *agg, double v, int id,char* hostname)
 {
-    /*if(v == 0){
-      if (agg->vcnt == 0)
-        {
-            agg->vmax = v;
-            agg->imax = id;
-            if(hostname!=NULL)
-                strncpy(agg->hostnamemax, hostname,SEGMENT_IDENTITY_NAME_LENGTH-1);
-            return true;
-        }
-    }
-    else */if (v > 0)
+    if (v > 0)
     {
         agg->vsum += v;
         agg->vcnt++;
 
-        if (v >= agg->vmax ||
+        if (v > agg->vmax ||
             agg->vcnt == 0)
         {
             agg->vmax = v;


Mime
View raw message