Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Query: correlated collection optimization doesn't get applied for subqueries with AsQueryable #12195

Closed
maumar opened this issue Jun 1, 2018 · 5 comments
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. type-enhancement

Comments

@maumar
Copy link
Contributor

maumar commented Jun 1, 2018

Currently we only apply correlated collection optimization of the subquery doesn't have any result operators. We should allow AsQueryable, for cases like this:

var query = ctx.LevelOne.Select(l1 => new 
{ 
    l1.Id, 
    Collection = l1.OneToMany_Optional.AsQueryable().Include(l2 => l2.OneToOne_Required_FK).ToList() 
});

i.e. to apply include on a collection when the source qsre is not projected directly (#12181 has more details)

@maumar
Copy link
Contributor Author

maumar commented Aug 17, 2018

need to decide how we approach Include for those complex scenarios.

@ajcvickers
Copy link
Member

@smitpatel to link to Include issue.

@smitpatel
Copy link
Contributor

Based on include path interpretation we can determine if we need this kind of pattern supported. #12737

@ajcvickers
Copy link
Member

Moving this to 3.0 to consider as part of the overall 3.0 query plan: #12795

@smitpatel
Copy link
Contributor

@maumar - Given that nav rewrite converts methods to queryable, does it swallow away AsQueryable? If not, should it do it? Is this issue relevant anymore?

@ajcvickers ajcvickers removed this from the 3.0.0 milestone Jun 28, 2019
@smitpatel smitpatel removed their assignment Jan 12, 2022
@ajcvickers ajcvickers added the closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. label Mar 10, 2022
@ajcvickers ajcvickers reopened this Oct 16, 2022
@ajcvickers ajcvickers closed this as not planned Won't fix, can't repro, duplicate, stale Oct 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
closed-out-of-scope This is not something that will be fixed/implemented and the issue is closed. type-enhancement
Projects
None yet
Development

No branches or pull requests

3 participants