Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
e443aa3
added MakeList and MakeSet aggregators
ezrahaleva-msft May 14, 2024
db1872a
Added MakeList and MakeSet to AggregateQueryTests.cs
ezrahaleva-msft May 24, 2024
b84e8e2
Adjust Aggregators
ezrahaleva-msft Jun 3, 2024
f42c7ec
Add Array Aggregate Continuation Token Test
ezrahaleva-msft Jun 3, 2024
2cb739c
Added group by coverage for MakeList and MakeSet
ezrahaleva-msft Jun 3, 2024
7c863d4
address comments
ezrahaleva-msft Jun 4, 2024
ff6637c
cleaning
ezrahaleva-msft Jun 4, 2024
a2c6d44
Refactored test to better detect when to ignore result order
ezrahaleva-msft Jun 5, 2024
1c82431
cleaning
ezrahaleva-msft Jun 6, 2024
8353971
cleaning, update baseline
ezrahaleva-msft Jun 6, 2024
2758e0b
cleaning
ezrahaleva-msft Jun 6, 2024
61059ac
removed old comment
ezrahaleva-msft Jun 6, 2024
57f6311
cleaning/refactoring
ezrahaleva-msft Jun 10, 2024
2c1c051
Merge branch 'master' into users/ezrahaleva/MakeListDistribution
ezrahaleva-msft Jun 11, 2024
51f5d12
cleaning
ezrahaleva-msft Jun 11, 2024
5fcb089
Add explicit cases to hit continuation token limit.
ezrahaleva-msft Jun 14, 2024
6522334
Added additional case to GroupBy tests
ezrahaleva-msft Jun 14, 2024
0defd1a
cleaning
ezrahaleva-msft Jun 14, 2024
eec3632
cleaning
ezrahaleva-msft Jun 17, 2024
918c35e
cleaning, updated baseline test
ezrahaleva-msft Jun 18, 2024
4dc9f9d
cleaning, updated baseline test
ezrahaleva-msft Jun 18, 2024
f05d33f
Added coverage to QueryPlanBaselineTests.cs
ezrahaleva-msft Jun 19, 2024
710fc76
refactored
ezrahaleva-msft Jun 20, 2024
be853ce
Merge branch 'master' into users/ezrahaleva/MakeListDistribution
ezrahaleva-msft Jun 20, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add explicit cases to hit continuation token limit.
  • Loading branch information
ezrahaleva-msft committed Jun 14, 2024
commit 5fcb08999eca182444b8132c170477712aea754c
Original file line number Diff line number Diff line change
Expand Up @@ -1112,9 +1112,11 @@ private async Task TestNonValueAggregates(
[TestMethod]
public async Task TestArrayAggregatesWithContinuationTokenAsync()
{
//await this.TestArrayAggregatesWithContinuationToken(100, new int[] { 1, 10, 100 });

await this.TestArrayAggregatesWithContinuationToken(100);

// using 2048 + 1 documents here to ensure list size hits continuation token limit of 16KB
// We aggregates c.age (integers) which has 8 bytes, 16KB / 8B = 2048
await this.TestArrayAggregatesWithContinuationToken(2049);
}
private async Task TestArrayAggregatesWithContinuationToken(int numDocuments)
Comment thread
ezrahaleva-msft marked this conversation as resolved.
{
Expand Down Expand Up @@ -1153,7 +1155,6 @@ async static Task ImplementationAsync(Container container, IReadOnlyList<CosmosO
{
foreach (string[] queriesToCompare in new string[][]
{
//new string[]{ "SELECT VALUE c.age FROM c ORDER BY c.age", "SELECT VALUE MakeList(c.age) FROM c GROUP BY c.name" },
new string[]{ "SELECT VALUE c.age FROM c", "SELECT VALUE MakeList(c.age) FROM c" },
new string[]{ "SELECT DISTINCT VALUE c.age FROM c ORDER BY c.age", "SELECT VALUE MakeSet(c.age) FROM c" },
})
Expand All @@ -1165,16 +1166,16 @@ async static Task ImplementationAsync(Container container, IReadOnlyList<CosmosO
new QueryRequestOptions()
{
MaxConcurrency = 10,
MaxItemCount = 10000,
MaxItemCount = 100,
},
QueryDrainingMode.ContinuationToken | QueryDrainingMode.HoldState);

CosmosElement[] normalizedExpectedResult = expectedDocuments.ToArray();
Array.Sort(normalizedExpectedResult);

CosmosArray normalizedExpectedCosmosArray = CosmosArray.Create(normalizedExpectedResult);
int[] pageSizes = new int[] { 1, 10, 100 };
//int[] pageSizes = (documents.Count() < 1000) ? new int[] { 1, 10, 100 } : new int[] { 1000 };

int[] pageSizes = (documents.Count() < 1000) ? new int[] { 1, 10, 100 } : new int[] { 100 };
foreach (int pageSize in pageSizes)
{
string queryWithAggregate = queriesToCompare[1];
Expand Down