Skip to content

Cosmos: handle fake LeftJoins in query tree #33969

@roji

Description

@roji

Our preprocessing (nav expansion) produces LeftJoin nodes for owned entity collection, such as in the following case:

public virtual Task Filter_owned_entity_chained_with_regular_entity_followed_by_projecting_owned_collection(bool async)
    => AssertQuery(
        async,
        ss => ss.Set<OwnedPerson>().Where(p => p.PersonAddress.Country.Planet.Id != 42).OrderBy(p => p.Id)
            .Select(p => new { p.Orders }),
        assertOrder: true,
        elementAsserter: (e, a) => AssertCollection(e.Orders, a.Orders));

Of course, in Cosmos (and in relational JSON), p.Orders doesn't represent a join at all; so we need to ignore it, reverse-engineering the original query so that this can be translated.

Long-term, we should get rid of these nodes altogether by removing nav expansion as a preprocessing step (#32957).

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions