Files
mongo/jstests/core/query/query_settings
James H fb711ce790 SERVER-86400: Verify $natural behaviour when hinted for secondary collections (#20143)
SERVER-86400

Handle $natural hint for secondary collections in QuerySettings

$natural hint on secondary collections already has the desired behaviour
of preventing use of an index (observed as changing the solution from
IndexedLoopJoin to HashJoin).

However, the hinted direction would previously overwrite that of the
main collection.
Additionally, hinting an index for the secondary collection could
prevent a collection scan on the main collection, by setting
Options::NO_TABLE_SCAN in the options used by the main collection.

Correct this behaviour, and guard with tests.

GitOrigin-RevId: eaddaea70f1d3e4fb037c32aeae863bab6de0831
2024-04-02 12:47:04 +00:00
..