Cosmos: supporting projecting out arrays directly, without wrapping in an object
Open
area-cosmos
area-query
- Dominant language
- C#
- Stars
- 14.8k
- Forks
- 3.4k
- PR merge metrics
- PR metrics pending
Description
For example, test PrimitiveCollectionsQueryCosmosTest.Project_inline_collection:
```c#
public virtual Task Project_inline_collection(bool async)
=> AssertQuery(
async,
ss => ss.Set().Select(x => new[] { x.String, "foo" }),
elementAsserter: (e, a) => AssertCollection(e, a, ordered: true),
assertOrder: true);
```
Current SQL:
```sql
SELECT VALUE {"c" : [c["String"], "foo"]}
FROM root c
WHERE (c["Discriminator"] = "PrimitiveCollectionsEntity")
```
We should have `SELECT VALUE [c["String"], "foo"]` instead.
Contributor guide
Assessment
This issue has not been assessed yet.