Skip to content

Cosmos: Support projecting out (primitive) collections #33797

Closed

Description

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions