if (compareResult == 0)
node->mj_JoinState = EXEC_MJ_JOINTUPLES;
- else
- {
- Assert(compareResult < 0);
+ else if (compareResult < 0)
node->mj_JoinState = EXEC_MJ_NEXTOUTER;
- }
+ else /* compareResult > 0 should not happen */
+ elog(ERROR, "mergejoin input data is out of order");
break;
case MJEVAL_NONMATCHABLE:
node->mj_JoinState = EXEC_MJ_JOINTUPLES;
}
- else
+ else if (compareResult > 0)
{
/* ----------------
* if the new outer tuple didn't match the marked inner
* no more inners, no more matches are possible.
* ----------------
*/
- Assert(compareResult > 0);
innerTupleSlot = node->mj_InnerTupleSlot;
/* reload comparison data for current inner */
return NULL;
}
}
+ else /* compareResult < 0 should not happen */
+ elog(ERROR, "mergejoin input data is out of order");
break;
/*----------------------------------------------------------