The following query yields a different result in MongoDB and its Oracle emulation (tested on 23.9.0.25.08).
I have the following document:
[
{
customer_id: "C003",
contact: [
{
email: [
"narrator@fightclub.com",
"tyler.durden@fightclub.com"
]
},
{
phone: "555-2390"
}
]
}
]
The following query returns no document in MongoDB, but returns a document in Oracle Database
db.collection.aggregate([
{
$project: {
customer_id: 1,
email: "$contact.email"
}
}
])
It should not return a document because the projection should result to an array of arrays like this:
"email": [ [ "narrator@fightclub.com", "tyler.durden@fightclub.com" ] ]
However, in Oracle, the same projection results in:
email: [ 'narrator@fightclub.com', 'tyler.durden@fightclub.com' ]
Full test case: https://mongoplayground.net/p/hsc5irQJESB (also here for full explanation)