hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From odiache...@apache.org
Subject [29/38] incubator-hawq git commit: HAWQ-591. Explain analyze doesn't enter function cdbexplain_recvExecStats after QD finding QE error
Date Thu, 31 Mar 2016 00:24:22 GMT
HAWQ-591. Explain analyze doesn't enter function cdbexplain_recvExecStats after QD finding
QE error


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

Branch: refs/heads/HAWQ-546
Commit: c97629cdf983120a30951b51709d9418fda96bf0
Parents: e941498
Author: Lili Ma <ictmalili@gmail.com>
Authored: Fri Mar 25 17:08:24 2016 +0800
Committer: Oleksandr Diachenko <odiachenko@pivotal.io>
Committed: Wed Mar 30 17:23:32 2016 -0700

----------------------------------------------------------------------
 src/backend/commands/explain.c     | 2 +-
 src/backend/executor/nodeSubplan.c | 8 ++++++--
 2 files changed, 7 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/c97629cd/src/backend/commands/explain.c
----------------------------------------------------------------------
diff --git a/src/backend/commands/explain.c b/src/backend/commands/explain.c
index 0e7bff5..3b64d22 100644
--- a/src/backend/commands/explain.c
+++ b/src/backend/commands/explain.c
@@ -584,7 +584,7 @@ ExplainOnePlan_internal(PlannedStmt *plannedstmt,
             cdbexplain_localExecStats(queryDesc->planstate, es->showstatctx);
 
         /* Fill in the plan's Instrumentation with stats from qExecs. */
-        if (estate->dispatch_data)
+        if (estate->dispatch_data && !dispatcher_has_error(estate->dispatch_data))
             cdbexplain_recvExecStats(queryDesc->planstate,
                                      dispatch_get_results(estate->dispatch_data),
                                      LocallyExecutingSliceIndex(estate),

http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/c97629cd/src/backend/executor/nodeSubplan.c
----------------------------------------------------------------------
diff --git a/src/backend/executor/nodeSubplan.c b/src/backend/executor/nodeSubplan.c
index 1a9b31b..999ffb4 100644
--- a/src/backend/executor/nodeSubplan.c
+++ b/src/backend/executor/nodeSubplan.c
@@ -1305,13 +1305,17 @@ ExecSetParamPlan(SubPlanState *node, ExprContext *econtext, QueryDesc
*gbl_query
 
                 /* Jam stats into subplan's Instrumentation nodes. */
                 explainRecvStats = true;
-                cdbexplain_recvExecStats(planstate,
+                if (queryDesc->estate->dispatch_data &&
+                    !dispatcher_has_error(queryDesc->estate->dispatch_data))
+                {
+                  cdbexplain_recvExecStats(planstate,
                                          dispatch_get_results(queryDesc->estate->dispatch_data),
                                          LocallyExecutingSliceIndex(queryDesc->estate),
                                          econtext->ecxt_estate->showstatctx,
                                          dispatch_get_segment_num(queryDesc->estate->dispatch_data));
-            }
 
+                }
+            }
             /*
              * Wait for all gangs to finish.  Check and free the results.
              * If the dispatcher or any QE had an error, report it and


Mime
View raw message