Skip to content

Commit 5167c58

Browse files
committed
Revert "Better (methinks) inversion choice when the OR condition includes a node which is also matched directly"
This reverts commit ebcd4dd.
1 parent 29873bc commit 5167c58

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

src/jrd/optimizer/Retrieval.cpp

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1496,35 +1496,19 @@ InversionCandidate* Retrieval::makeInversion(InversionCandidateList& inversions)
14961496

14971497
// Look if a match is already used by previous matches.
14981498
bool anyMatchAlreadyUsed = false, matchUsedByNavigation = false;
1499-
if (currentInv->boolean)
1499+
for (const auto currentMatch : currentInv->matches)
15001500
{
1501-
if (matches.exist(currentInv->boolean))
1501+
if (matches.exist(currentMatch))
15021502
{
15031503
anyMatchAlreadyUsed = true;
15041504

15051505
if (navigationCandidate &&
1506-
navigationCandidate->matches.exist(currentInv->boolean))
1506+
navigationCandidate->matches.exist(currentMatch))
15071507
{
15081508
matchUsedByNavigation = true;
15091509
}
1510-
}
1511-
}
1512-
else
1513-
{
1514-
for (const auto currentMatch : currentInv->matches)
1515-
{
1516-
if (matches.exist(currentMatch))
1517-
{
1518-
anyMatchAlreadyUsed = true;
1519-
1520-
if (navigationCandidate &&
1521-
navigationCandidate->matches.exist(currentMatch))
1522-
{
1523-
matchUsedByNavigation = true;
1524-
}
15251510

1526-
break;
1527-
}
1511+
break;
15281512
}
15291513
}
15301514

0 commit comments

Comments
 (0)