-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
type: enhancementA general enhancementA general enhancement
Description
How can I check if a field reference/aggregation expression is null and obtain a boolean?
ConditionalOperators.ifNull("field").then(false)- does not return true/falseComparisonOperators.valueOf("field").equalToValue(null)- throws NPEBooleanOperators.Or.or(Fields.field("field"))- also returns true if value is 0
I just want to obtain $eq: ["$field", null]. Am I missing something?
Workaround
ArrayOperators.arrayOf(List.of("null", "missing")).containsValue((DataTypeOperators.typeOf("field")));But this results in a different query, I'd like to obtain exactly $eq: ["$field", null].
WildDev
Metadata
Metadata
Assignees
Labels
type: enhancementA general enhancementA general enhancement