You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hawq.apache.org by hu...@apache.org on 2016/02/23 06:41:58 UTC

incubator-hawq git commit: HAWQ-438. EagerlyReleased hash table involved in hash join in explain statement introduce core on hawq dbg build.

Repository: incubator-hawq
Updated Branches:
  refs/heads/master 109a17400 -> ef00dc560


HAWQ-438. EagerlyReleased hash table involved in hash join in explain statement introduce core on hawq dbg build.


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

Branch: refs/heads/master
Commit: ef00dc560d8bbc45db8f2a9c8e979d9c80e723d5
Parents: 109a174
Author: hubertzhang <hz...@pivotal.io>
Authored: Tue Feb 23 13:41:27 2016 +0800
Committer: hubertzhang <hz...@pivotal.io>
Committed: Tue Feb 23 13:41:27 2016 +0800

----------------------------------------------------------------------
 src/backend/executor/nodeHashjoin.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq/blob/ef00dc56/src/backend/executor/nodeHashjoin.c
----------------------------------------------------------------------
diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c
index 0623b81..d913b2f 100644
--- a/src/backend/executor/nodeHashjoin.c
+++ b/src/backend/executor/nodeHashjoin.c
@@ -355,7 +355,15 @@ ExecHashJoin(HashJoinState *node)
 			outerTupleSlot = ExecHashJoinOuterGetTuple(outerNode,
 													   node,
 													   &hashvalue);
-			if (TupIsNull(outerTupleSlot))
+			/*
+			 * If the inner relation is completely empty, and we're not doing an
+			 * outer join, we can quit without scanning the outer relation.
+			 */
+			if (TupIsNull(outerTupleSlot)
+					&& node->js.jointype != JOIN_LEFT
+					&& node->js.jointype != JOIN_LASJ
+					&& node->js.jointype != JOIN_LASJ_NOTIN
+					&& node->hj_InnerEmpty)
 			{
 				/* end of join */
 				if (gp_eager_hashtable_release)