Skip to content

Commit c5dd3be

Browse files
author
leminh98
committed
Merge branch 'users/leminh/LINQGroupByMultiValue' of https://github.com/Azure/azure-cosmos-dotnet-v3 into users/leminh/LINQGroupByMultiValue
2 parents d19b519 + 019b8f2 commit c5dd3be

File tree

50 files changed

+110
-1805
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+110
-1805
lines changed

Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedIteratorCore.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -340,11 +340,6 @@ private async Task<ResponseMessage> ReadNextInternalAsync(ITrace trace, Cancella
340340
return responseMessage;
341341
}
342342

343-
public override CosmosElement GetCosmosElementContinuationToken()
344-
{
345-
throw new NotSupportedException();
346-
}
347-
348343
private sealed class ChangeFeedStateFromToChangeFeedCrossFeedRangeState : ChangeFeedStartFromVisitor<TryCatch<ChangeFeedCrossFeedRangeState>>
349344
{
350345
public static readonly ChangeFeedStateFromToChangeFeedCrossFeedRangeState Singleton = new ChangeFeedStateFromToChangeFeedCrossFeedRangeState();

Microsoft.Azure.Cosmos/src/ChangeFeed/ChangeFeedPartitionKeyResultSetIteratorCore.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,6 @@ private ChangeFeedPartitionKeyResultSetIteratorCore(
8585

8686
public override bool HasMoreResults => this.hasMoreResultsInternal;
8787

88-
public override CosmosElement GetCosmosElementContinuationToken()
89-
{
90-
throw new NotImplementedException();
91-
}
92-
9388
/// <summary>
9489
/// Get the next set of results from the cosmos service
9590
/// </summary>

Microsoft.Azure.Cosmos/src/ChangeFeed/StandByFeedIteratorCore.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,5 @@ internal virtual Task<ResponseMessage> NextResultSetDelegateAsync(
207207
trace: trace,
208208
cancellationToken: cancellationToken);
209209
}
210-
211-
public override CosmosElement GetCosmosElementContinuationToken()
212-
{
213-
throw new NotImplementedException();
214-
}
215210
}
216211
}

Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Aggregate/AggregateQueryPipelineStage.Client.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ private ClientAggregateQueryPipelineStage(
2828
// all the work is done in the base constructor.
2929
}
3030

31-
public static TryCatch<IQueryPipelineStage> MonadicCreate(
31+
public static new TryCatch<IQueryPipelineStage> MonadicCreate(
3232
IReadOnlyList<AggregateOperator> aggregates,
3333
IReadOnlyDictionary<string, AggregateOperator?> aliasToAggregateType,
3434
IReadOnlyList<string> orderedAliases,

Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Aggregate/AggregateQueryPipelineStage.Compute.cs

Lines changed: 0 additions & 254 deletions
This file was deleted.

Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/Aggregate/AggregateQueryPipelineStage.cs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -58,30 +58,21 @@ public AggregateQueryPipelineStage(
5858
}
5959

6060
public static TryCatch<IQueryPipelineStage> MonadicCreate(
61-
ExecutionEnvironment executionEnvironment,
6261
IReadOnlyList<AggregateOperator> aggregates,
6362
IReadOnlyDictionary<string, AggregateOperator?> aliasToAggregateType,
6463
IReadOnlyList<string> orderedAliases,
6564
bool hasSelectValue,
6665
CosmosElement continuationToken,
67-
MonadicCreatePipelineStage monadicCreatePipelineStage) => executionEnvironment switch
68-
{
69-
ExecutionEnvironment.Client => ClientAggregateQueryPipelineStage.MonadicCreate(
70-
aggregates,
71-
aliasToAggregateType,
72-
orderedAliases,
73-
hasSelectValue,
74-
continuationToken,
75-
monadicCreatePipelineStage),
76-
ExecutionEnvironment.Compute => ComputeAggregateQueryPipelineStage.MonadicCreate(
66+
MonadicCreatePipelineStage monadicCreatePipelineStage)
67+
{
68+
return ClientAggregateQueryPipelineStage.MonadicCreate(
7769
aggregates,
7870
aliasToAggregateType,
7971
orderedAliases,
8072
hasSelectValue,
8173
continuationToken,
82-
monadicCreatePipelineStage),
83-
_ => throw new ArgumentException($"Unknown {nameof(ExecutionEnvironment)}: {executionEnvironment}."),
84-
};
74+
monadicCreatePipelineStage);
75+
}
8576

8677
/// <summary>
8778
/// Struct for getting the payload out of the rewritten projection.

Microsoft.Azure.Cosmos/src/Query/Core/Pipeline/CosmosQueryExecutionContextFactory.cs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,6 @@ private static TryCatch<IQueryPipelineStage> TryCreateSpecializedDocumentQueryEx
407407
inputParameters.PartitionKey,
408408
inputParameters.Properties,
409409
inputParameters.PartitionedQueryExecutionInfo,
410-
inputParameters.ExecutionEnvironment,
411410
inputParameters.ReturnResultsInDeterministicOrder,
412411
inputParameters.EnableOptimisticDirectExecution,
413412
inputParameters.IsNonStreamingOrderByQueryFeatureDisabled,
@@ -559,7 +558,6 @@ private static TryCatch<IQueryPipelineStage> TryCreateSpecializedDocumentQueryEx
559558
$"Invalid MaxItemCount {optimalPageSize}");
560559

561560
return PipelineFactory.MonadicCreate(
562-
executionEnvironment: inputParameters.ExecutionEnvironment,
563561
documentContainer: documentContainer,
564562
sqlQuerySpec: inputParameters.SqlQuerySpec,
565563
targetRanges: targetRanges
@@ -831,7 +829,6 @@ public sealed class InputParameters
831829
private const int DefaultMaxItemCount = 1000;
832830
private const int DefaultMaxBufferedItemCount = 1000;
833831
private const bool DefaultReturnResultsInDeterministicOrder = true;
834-
private const ExecutionEnvironment DefaultExecutionEnvironment = ExecutionEnvironment.Client;
835832

836833
public InputParameters(
837834
SqlQuerySpec sqlQuerySpec,
@@ -843,7 +840,6 @@ public InputParameters(
843840
PartitionKey? partitionKey,
844841
IReadOnlyDictionary<string, object> properties,
845842
PartitionedQueryExecutionInfo partitionedQueryExecutionInfo,
846-
ExecutionEnvironment? executionEnvironment,
847843
bool? returnResultsInDeterministicOrder,
848844
bool enableOptimisticDirectExecution,
849845
bool isNonStreamingOrderByQueryFeatureDisabled,
@@ -877,7 +873,6 @@ public InputParameters(
877873
this.PartitionKey = partitionKey;
878874
this.Properties = properties;
879875
this.PartitionedQueryExecutionInfo = partitionedQueryExecutionInfo;
880-
this.ExecutionEnvironment = executionEnvironment.GetValueOrDefault(InputParameters.DefaultExecutionEnvironment);
881876
this.ReturnResultsInDeterministicOrder = returnResultsInDeterministicOrder.GetValueOrDefault(InputParameters.DefaultReturnResultsInDeterministicOrder);
882877
this.EnableOptimisticDirectExecution = enableOptimisticDirectExecution;
883878
this.IsNonStreamingOrderByQueryFeatureDisabled = isNonStreamingOrderByQueryFeatureDisabled;
@@ -893,7 +888,6 @@ public InputParameters(
893888
public PartitionKey? PartitionKey { get; }
894889
public IReadOnlyDictionary<string, object> Properties { get; }
895890
public PartitionedQueryExecutionInfo PartitionedQueryExecutionInfo { get; }
896-
public ExecutionEnvironment ExecutionEnvironment { get; }
897891
public bool ReturnResultsInDeterministicOrder { get; }
898892
public TestInjections TestInjections { get; }
899893
public bool EnableOptimisticDirectExecution { get; }
@@ -911,7 +905,6 @@ public InputParameters WithContinuationToken(CosmosElement token)
911905
this.PartitionKey,
912906
this.Properties,
913907
this.PartitionedQueryExecutionInfo,
914-
this.ExecutionEnvironment,
915908
this.ReturnResultsInDeterministicOrder,
916909
this.EnableOptimisticDirectExecution,
917910
this.IsNonStreamingOrderByQueryFeatureDisabled,

0 commit comments

Comments
 (0)