Operational Defect Database

BugZero found this defect 37 days ago.

MongoDB | 2640296

setQuerySettings fails on aggregate queries containing $bucket

Last update date:

4/12/2024

Affected products:

MongoDB Server

Affected releases:

8.0.0-rc0

Fixed releases:

No fixed releases provided.

Description:

Info

Trying to call setQuerySettings on the following aggregate query // Test that $bucket accepts a default value that falls outside the boundaries according to the // collation. results = coll.aggregate([{ $bucket: { groupBy: "$num", boundaries: ["100", "999"], default: "2"  // Would fall between 100 and 999 if using the simple collation. } }]) .toArray(); will result in the following error { "ok" : 0, "errmsg" : "The $bucket 'default' field must be less than the lowest boundary or greater than or equal to the highest boundary.", "code" : 40199, "codeName" : "Location40199", "$clusterTime" : { "clusterTime" : Timestamp(1712858859, 25), "signature" : { "hash" : BinData(0,"AAAAAAAAAAAAAAAAAAAAAAAAAAA="), "keyId" : NumberLong(0) } }, "operationTime" : Timestamp(1712858859, 25) } [Parsley logs

Top User Comments

JIRAUSER1269657 commented on Fri, 12 Apr 2024 12:43:42 +0000: As pointed out by denis.grebennicov@mongodb.com, this is another case of failing validation due to missing collection information (design decision due to mongos lacking collator information).

Steps to Reproduce


Additional Resources / Links

Share:

BugZero® Risk Score

What's this?

Coming soon

Status

Closed

Learn More

Search:

...