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

Cosmos: Support projecting out (primitive) collections #33797

Closed
roji opened this issue May 23, 2024 · 0 comments · Fixed by #34061
Closed

Cosmos: Support projecting out (primitive) collections #33797

roji opened this issue May 23, 2024 · 0 comments · Fixed by #34061
Assignees
Labels
area-cosmos area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement

Comments

@roji
Copy link
Member

roji commented May 23, 2024

We need to generally think about how this is handled, not just in Cosmos; in relational, ToList() is handled very specifically in RelationalProjectionBindingEV - not sure if e.g. ToArray() works.

Also, think about whether ToList() should be handled purely as a Select() phenomenon (i.e. in ProjectionBindingEV). In Cosmos, it probably makes sense for ToList() to be generally translatable to ARRAY(), i.e. as a way to convert the results of a subquery to a collection scalar. This could also make sense in relational (e.g. array_agg on PG). On the other hand, ToList() seems to be useful mostly/only in projections, since one can simply e.g. compare the results of a subquery directly to some array (Where(b => b.Ints.Where(...) == b.Ints2 - this applies ARRAY() as well).

@roji roji added this to the 9.0.0 milestone May 23, 2024
@roji roji self-assigned this May 23, 2024
roji added a commit to roji/efcore that referenced this issue Jun 22, 2024
roji added a commit to roji/efcore that referenced this issue Jun 22, 2024
roji added a commit to roji/efcore that referenced this issue Jun 22, 2024
@roji roji added the closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. label Jun 22, 2024
@roji roji changed the title Cosmos: support projecting out (primitive) collections Cosmos: Support projecting out (primitive) collections Jun 24, 2024
roji added a commit to roji/efcore that referenced this issue Jun 24, 2024
@roji roji closed this as completed in 93c77f5 Jun 24, 2024
@ajcvickers ajcvickers modified the milestones: 9.0.0, 9.0.0-preview7 Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-cosmos area-query closed-fixed The issue has been fixed and is/will be included in the release indicated by the issue milestone. type-enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants