-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(server/mongo): support missing fields with isnull/notnull [TCTC-9…
…655] A join step can introduce missing fields: if the `$lookup` step does not return anything, the right fields will be missing from the resulting documents. This causes `{$eq: [$missing_field, null]}` to always evaluate to false since the field cannot be looked up. This PR fixes that behaviour by defaulting to null for missing expressions with the isnull/isnotnull operators. The same logic was applied to the `then` and `else` branches: an `$addFields` aggreation with a `$cond` evalutating to an empty field just does NOT add a new field. Signed-off-by: Luka Peschke <[email protected]>
- Loading branch information
1 parent
4a1740b
commit 6bcd4be
Showing
4 changed files
with
17 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters