Cosmos has a coalescing operator (??); this coalesces Cosmos undefined (e.g. missing properties), but not null:
SELECT null ?? 'foo' -- returns null
SELECT undefined ?? 'foo' -- returns foo
As a result, this operator is unsuitable for translation of regular .NET coalescing operations; we already use the conditional operator for that (x != null ? x : 'foo'). However, the user should be able to express the coalescing operator via e.g. an EF.Functions.CoalesceUndefined() function.
This can probably be done together with #17722 (add IS_DEFINED() translation), as part of a better story around Cosmos undefined.
/cc @ajcvickers
Cosmos has a coalescing operator (
??); this coalesces Cosmosundefined(e.g. missing properties), but not null:As a result, this operator is unsuitable for translation of regular .NET coalescing operations; we already use the conditional operator for that (
x != null ? x : 'foo'). However, the user should be able to express the coalescing operator via e.g. anEF.Functions.CoalesceUndefined()function.This can probably be done together with #17722 (add
IS_DEFINED()translation), as part of a better story around Cosmosundefined./cc @ajcvickers