Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c84dc34

Browse files
author
Alexandra Pervushina
committed
Change reliability to minimum for hash join nodes that were terminated early
1 parent 1b1b95d commit c84dc34

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

postprocessing.c

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,17 @@ should_learn(PlanState *ps, AQOPlanNode *node, aqo_obj_stat *ctx,
336336
}
337337
else if (ctx->learn)
338338
{
339+
elog(NOTICE, "fss %d, IsNull %s, nloops %lf", node->fss, TupIsNull(ps->ps_ResultTupleSlot) ? "true" : "false", ps->instrument->nloops);
340+
if (IsA(ps, HashJoinState))
341+
{
342+
HashJoinState *hjstate = castNode(HashJoinState, ps);
343+
elog(NOTICE, "TerminatedEarly %s", hjstate->hj_TerminatedEarly ? "true" : "false");
344+
if (hjstate->hj_TerminatedEarly)
345+
{
346+
*rfactor = RELIABILITY_MIN;
347+
return true;
348+
}
349+
}
339350
*rfactor = RELIABILITY_MAX;
340351
return true;
341352
}

0 commit comments

Comments
 (0)