-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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: collection.ToArray in projection #16318
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
Milestone
Comments
Marking for triage, since ASP.NET app is hitting this. |
We're seemingly getting hit by this in the ASP.NET Core app-building workshop codebase too: |
smitpatel
added
the
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
label
Aug 17, 2019
smitpatel
added a commit
that referenced
this issue
Aug 17, 2019
…ient code The shapers on relational now take ResultContext which stores object[] of temporary values. Then populate the collection fully. Then call into client code to generate final result. Resolves #16318
smitpatel
added a commit
that referenced
this issue
Aug 19, 2019
…ient code The shapers on relational now take ResultContext which stores object[] of temporary values. Then populate the collection fully. Then call into client code to generate final result. Resolves #16318
smitpatel
added a commit
that referenced
this issue
Aug 19, 2019
…ient code The shapers on relational now take ResultContext which stores object[] of temporary values. Then populate the collection fully. Then call into client code to generate final result. Resolves #16318
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
closed-fixed
The issue has been fixed and is/will be included in the release indicated by the issue milestone.
type-bug
How our collection materialization in relational goes over multiple rows is,
We create the result and inject empty list (or collection if coming from navigation) for parts.
Then we iterate over and populate those collections. Once that is done, we return the result.
ToArray call is problematic since we create a list but ToArray is called on list before we populate it. So we need to call ToArray after populating collection. But the way to find out collection is populated is when we reach row for next result. So we don't have data to compute non-collection part of result. We could potentially create Array directly and resize it as we add elements.
Work-around: do anonymous projection followed by AsEnumerable. Then it can be converted to whichever is desired shape.
The text was updated successfully, but these errors were encountered: