aboutsummaryrefslogtreecommitdiff
path: root/src/backend/executor/nodeHashjoin.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/executor/nodeHashjoin.c')
-rw-r--r--src/backend/executor/nodeHashjoin.c50
1 files changed, 24 insertions, 26 deletions
diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c
index 837837bece0..4534845b527 100644
--- a/src/backend/executor/nodeHashjoin.c
+++ b/src/backend/executor/nodeHashjoin.c
@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.94 2008/08/14 18:47:58 tgl Exp $
+ * $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.95 2008/08/15 19:20:42 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -264,36 +264,34 @@ ExecHashJoin(HashJoinState *node)
node->hj_NeedNewOuter = true;
break; /* out of loop over hash bucket */
}
- else
+
+ /*
+ * In a semijoin, we'll consider returning the first match,
+ * but after that we're done with this outer tuple.
+ */
+ if (node->js.jointype == JOIN_SEMI)
+ node->hj_NeedNewOuter = true;
+
+ if (otherqual == NIL || ExecQual(otherqual, econtext, false))
{
- /*
- * In a semijoin, we'll consider returning the first match,
- * but after that we're done with this outer tuple.
- */
- if (node->js.jointype == JOIN_SEMI)
- node->hj_NeedNewOuter = true;
-
- if (otherqual == NIL || ExecQual(otherqual, econtext, false))
- {
- TupleTableSlot *result;
+ TupleTableSlot *result;
- result = ExecProject(node->js.ps.ps_ProjInfo, &isDone);
+ result = ExecProject(node->js.ps.ps_ProjInfo, &isDone);
- if (isDone != ExprEndResult)
- {
- node->js.ps.ps_TupFromTlist =
- (isDone == ExprMultipleResult);
- return result;
- }
+ if (isDone != ExprEndResult)
+ {
+ node->js.ps.ps_TupFromTlist =
+ (isDone == ExprMultipleResult);
+ return result;
}
-
- /*
- * If semijoin and we didn't return the tuple, we're still
- * done with this outer tuple.
- */
- if (node->js.jointype == JOIN_SEMI)
- break; /* out of loop over hash bucket */
}
+
+ /*
+ * If semijoin and we didn't return the tuple, we're still
+ * done with this outer tuple.
+ */
+ if (node->js.jointype == JOIN_SEMI)
+ break; /* out of loop over hash bucket */
}
}