SERVER-137994Open

Join optimization INLJ over multikey compound index returns duplicate row per array element

createIndexProbeQSN() in reorder_joins.cpp builds the IndexEntry with isMultikey=false regardless of the catalog, so buildIndexedJoinIndexProbe() never adds the dedup stage. Probing \{y: 1, tags: 1} with bounds [x, MinKey]..[x, MaxKey] returns the foreign document once per element of tags. The join field itself is scalar, so path arrayness does not block the plan; INLJ is chosen naturally with a large foreign collection.

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix

No fix available yet.

Components
Server components related to this issue

No components specified.

Labels
Tags and classification
found-by-ai