hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hubertzh...@apache.org
Subject [4/5] incubator-hawq git commit: Revert "fff"
Date Thu, 14 Apr 2016 08:01:28 GMT
Revert "fff"

This reverts commit d4e27a41443d4bd4bb1dfb058cfec05459fac22b.


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

Branch: refs/heads/master
Commit: 63ef5499e09abe944da3848f8a7c52fc98317bb5
Parents: 5a4583e
Author: hzhang2 <zhanghuan929@163.com>
Authored: Thu Apr 14 15:51:53 2016 +0800
Committer: hzhang2 <zhanghuan929@163.com>
Committed: Thu Apr 14 15:51:53 2016 +0800

----------------------------------------------------------------------
 src/backend/cdb/cdbexplain.c | 34 +++++++++++++++++++++++++++++-----
 1 file changed, 29 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/63ef5499/src/backend/cdb/cdbexplain.c
----------------------------------------------------------------------
diff --git a/src/backend/cdb/cdbexplain.c b/src/backend/cdb/cdbexplain.c
index 84dafc1..bea98ca 100644
--- a/src/backend/cdb/cdbexplain.c
+++ b/src/backend/cdb/cdbexplain.c
@@ -1424,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 >= 0){
+    if ( nInst > 1 && segindex >= 0){
     	/*check if truncation occurs */
 #ifdef USE_ASSERT_CHECKING
     	int nchars_written =
@@ -1564,7 +1564,7 @@ cdbexplain_showExecStats(struct PlanState              *planstate,
         case T_BitmapIndexScanState:
             s_row = "";
             s_rows = "";
-            if (ns->ntuples.vcnt > 0){
+            if (ns->ntuples.vcnt > 1){
                 appendStringInfo(str,
                                  "Bitmaps out:  Avg %.1f x %d workers."
                                  "  Max/Last(%s/%s) %.0f/%.0f rows",
@@ -1574,9 +1574,15 @@ cdbexplain_showExecStats(struct PlanState              *planstate,
 								ns->ntuples.vmax,ns->ntuples.vlast);
                 containMaxRowAndLast = true;
             }
+            else
+                appendStringInfo(str,
+                                 "Bitmaps out:  %s%.0f%s",
+								 noRowRequested,
+                                 ns->ntuples.vmax,
+								 segbufWithParenthese);
             break;
         case T_HashState:
-            if (ns->ntuples.vcnt > 0){
+            if (ns->ntuples.vcnt > 1){
                 appendStringInfo(str,
                                  "Rows in:  Avg %.1f rows x %d workers."
                                  "  Max/Last(%s/%s) %.0f/%.0f rows",
@@ -1586,9 +1592,15 @@ cdbexplain_showExecStats(struct PlanState              *planstate,
 								ns->ntuples.vmax,ns->ntuples.vlast);
                 containMaxRowAndLast = true;
             }
+            else
+                appendStringInfo(str,
+                                 "Rows in:  %s%.0f rows%s",
+								 noRowRequested,
+                                 ns->ntuples.vmax,
+								segbufWithParenthese);
             break;
         case T_MotionState:
-            if (ns->ntuples.vcnt > 0){
+            if (ns->ntuples.vcnt > 1){
                 appendStringInfo(str,
                                  "Rows out:  Avg %.1f rows x %d workers"
                                  " at destination.  Max/Last(%s/%s) %.0f/%.0f rows",
@@ -1598,9 +1610,15 @@ cdbexplain_showExecStats(struct PlanState              *planstate,
 								ns->ntuples.vmax,ns->ntuples.vlast);
                 containMaxRowAndLast = true;
             }
+            else
+                appendStringInfo(str,
+                                 "Rows out:  %s%.0f rows at destination%s",
+								 noRowRequested,
+                                 ns->ntuples.vmax,
+								segbufWithParenthese);
             break;
         default:
-            if (ns->ntuples.vcnt > 0){
+            if (ns->ntuples.vcnt > 1){
                 appendStringInfo(str,
                                  "Rows out:  Avg %.1f rows x %d workers."
                                  "  Max/Last(%s/%s) %.0f/%.0f rows",
@@ -1610,6 +1628,12 @@ cdbexplain_showExecStats(struct PlanState              *planstate,
                                  ns->ntuples.vmax,ns->ntuples.vlast);
                 containMaxRowAndLast = true;
             }
+            else
+                appendStringInfo(str,
+                                 "Rows out:  %s%.0f rows%s",
+								 noRowRequested,
+                                 ns->ntuples.vmax,
+								segbufWithParenthese);
     }
 
     if( containMaxRowAndLast ){


Mime
View raw message