SERVER-135986ClosedFixed

Fix unique document count for projected samples

[countUniqueDocuments|[https://github.com/10gen/mongo/blob/f10c8e92fc81557bbe021594e044d11bd3a4b02c/src/mongo/db/query/compiler/ce/ce_common.cpp#L338])] counts distinct _id values, but CBR samples that are projected without _id, result in the count of 1. In SamplingEstimatorImpl::[estimateNDV|https://github.com/10gen/mongo/blob/27378125adb5b6e4e80f8dfcf4ffa4d34ea265b2/src/mongo/db/query/compiler/ce/sampling/sampling_estimator_impl.cpp#L1421], a sample NDV of 1  combined with 1 unique document

Affected Versions
Versions known to exhibit this issue

No affected versions recorded.

Fixed Versions
Versions that include the fix
9.1.0-rc09.1.0-rc1025
Components
Server components related to this issue

No components specified.

Labels
Tags and classification
qo-triage-week