Skip to content

Commit 9d89faa

Browse files
committed
Postfix for #8223. Semi-joined streams may be intermixed with inner-joined ones.
1 parent 183cb70 commit 9d89faa

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/jrd/optimizer/Optimizer.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,6 @@ RecordSource* Optimizer::compile(BoolExprNodeStack* parentStack)
843843

844844
RiverList rivers, dependentRivers, specialRivers;
845845

846-
bool semiJoin = false;
847846
bool innerSubStream = false;
848847

849848
for (auto node : rse->rse_relations)
@@ -852,13 +851,9 @@ RecordSource* Optimizer::compile(BoolExprNodeStack* parentStack)
852851
fb_assert(aggregate == rse->rse_aggregate);
853852

854853
const auto subRse = nodeAs<RseNode>(node);
855-
if (subRse && subRse->isSemiJoined())
856-
{
857-
fb_assert(rse->rse_jointype == blr_inner);
858-
semiJoin = true;
859-
}
860-
else
861-
fb_assert(!semiJoin);
854+
855+
const bool semiJoin = (subRse && subRse->isSemiJoined());
856+
fb_assert(!semiJoin || rse->rse_jointype == blr_inner);
862857

863858
// Find the stream number and place it at the end of the bedStreams array
864859
// (if this is really a stream and not another RseNode)

0 commit comments

Comments
 (0)