Track scan reversals in MergeJoin
authorPeter Eisentraut <peter@eisentraut.org>
Mon, 14 Oct 2024 13:36:18 +0000 (15:36 +0200)
committerPeter Eisentraut <peter@eisentraut.org>
Mon, 14 Oct 2024 13:36:18 +0000 (15:36 +0200)
commitc594f1ad2ba7cbe66e8ae98da4ffed06491d1082
tree12d7f1656a8c301219a0ec36a88d483e2f2879ca
parent0d2aa4d4937bb0500823edfc7d620f4e5fa45b9c
Track scan reversals in MergeJoin

The MergeJoin struct was tracking "mergeStrategies", which were an
array of btree strategy numbers, purely for the purpose of comparing
it later against btree strategies to determine if the scan direction
was forward or reverse.  Change that.  Instead, track
"mergeReversals", an array of bool, to indicate the same without an
unfortunate assumption that a strategy number refers specifically to a
btree strategy.

Author: Mark Dilger <mark.dilger@enterprisedb.com>
Discussion: https://www.postgresql.org/message-id/flat/E72EAA49-354D-4C2E-8EB9-255197F55330@enterprisedb.com
src/backend/executor/nodeMergejoin.c
src/backend/optimizer/plan/createplan.c
src/include/nodes/plannodes.h