Skip to content

Cosmos: Implement EF.Functions.CoalesceUndefined #33904

@roji

Description

@roji

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

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions