Description
Result from distinct for empty query with a hashed index is incorrect:
> t.distinct('a', {})
[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ]
> t.ensureIndex(
);
> t.distinct('a', {})
[
NumberLong("-6504342592125989714"),
NumberLong("-6200100076853976706"),
NumberLong("-1529429926180645992"),
NumberLong("848411777775835583"),
NumberLong("2433984061343616404"),
NumberLong("4470791281878691347"),
NumberLong("4854801880128277513"),
NumberLong("5902408780260971510"),
NumberLong("6497670140411665948"),
NumberLong("9174449368162552349")
]
> t.distinct('a',
)
[ 3 ]