-
Notifications
You must be signed in to change notification settings - Fork 31
Closed
Description
I'm unsure if it's feasible to implement. The solution may be to raise NotSupportedError.
>>> inner_qs = IntegerArrayModel.objects.filter(field__contains=OuterRef("field"))`
>>> NullableIntegerArrayModel.objects.filter(Exists(inner_qs))
...
PlanExecutor error during aggregation :: caused by :: both operands of $setIsSubset must be arrays. First argument is of type: nulldb.model_fields__nullableintegerarraymodel.aggregate([
{
"$lookup": {
"as": "__subquery0",
"from": "model_fields__integerarraymodel",
"let": {},
"pipeline": [
{"$match": {"$expr": {}}},
{"$project": {"field": 1}},
{"$limit": 1},
],
}
},
{
"$set": {
"__subquery0": {
"$cond": {
"if": {
"$or": [
{"$eq": [{"$type": "$__subquery0"}, "missing"]},
{"$eq": [{"$size": "$__subquery0"}, 0]},
]
},
"then": {},
"else": {"$arrayElemAt": ["$__subquery0", 0]},
}
}
}
},
{
"$match": {
"$expr": {
"$eq": [
{
"$cond": {
"if": {"$eq": ["$field", None]},
"then": FALSE,
"else": {"$setIsSubset": ["$__subquery0.field", "$field"]},
}
},
TRUE,
]
}
}
},
]);
Metadata
Metadata
Assignees
Labels
No labels