Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
085d7d5
Added ability to accept the AllowOptimisticDirectExecution flag from …
akotalwar Oct 13, 2023
9eda804
Added comment and removed extra spacing
akotalwar Oct 13, 2023
c054c51
Added test coverage
akotalwar Oct 13, 2023
076f345
Added exception handling logic
akotalwar Oct 15, 2023
5f29b91
Resolved comments
akotalwar Oct 20, 2023
2191de4
Added null check for key parameter
akotalwar Oct 23, 2023
61c3893
Removed changes to common test infra
akotalwar Oct 23, 2023
5d24481
Removed all changes from QueryPartitionProviderTestInstance
akotalwar Oct 24, 2023
cc01ca5
Remove changes pt2
akotalwar Oct 24, 2023
a46862f
Removed the dictionary in QueryPartitionProvider and added a bool ins…
akotalwar Oct 24, 2023
6a6e495
Updated GetClientDisableOptimisticDirectExecution()
akotalwar Oct 24, 2023
bdda380
Fixed comments
akotalwar Oct 26, 2023
5f9a2b6
Revert QueryIterator.cs
akotalwar Oct 26, 2023
5e0f682
Undoing changes to settings.json
akotalwar Oct 26, 2023
26dfda8
Undoing changes to QueryIterator.cs
akotalwar Oct 26, 2023
986c3a3
Updated error message
akotalwar Oct 26, 2023
a953803
Made functions static
akotalwar Oct 27, 2023
8d711ff
Cast to bool instead of recasting in GetClientDisableOptimisticDirect…
akotalwar Oct 27, 2023
35d6618
Fix merge conflicts
akotalwar Oct 27, 2023
459a4b9
Merge branch 'master' into users/akotalwar/ODEGatewayConfig
akotalwar Oct 27, 2023
f8cc146
Added ignore flag
akotalwar Dec 7, 2023
0ff09d7
Merge branch 'master' into users/akotalwar/ODEGatewayConfig
akotalwar Dec 7, 2023
ab3f46e
Fixed merge conflicts
akotalwar Dec 7, 2023
a591dff
Updated GetPartitionedQueryExecutionInfoAndPartitionProvider()
akotalwar Dec 7, 2023
4bafe39
Updated return type in OffsetLimitPageSize()
akotalwar Dec 11, 2023
78a1eb7
Merge branch 'master' into users/akotalwar/ODEGatewayConfig
akotalwar Dec 12, 2023
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
Removed changes to common test infra
  • Loading branch information
akotalwar committed Oct 23, 2023
commit 61c389333b0900cce80553df9181ec0c700b3d7b
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ namespace Microsoft.Azure.Cosmos.Query.Core.ExecutionContext
internal static class CosmosQueryExecutionContextFactory
{
private const string InternalPartitionKeyDefinitionProperty = "x-ms-query-partitionkey-definition";
private const string AllowOptimisticDirectExecution = "allowOptimisticDirectExecution";
private const string OptimisticDirectExecution = "OptimisticDirectExecution";
private const string ClientDisableOptimisticDirectExecution = "clientDisableOptimisticDirectExecution";
private const string Passthrough = "Passthrough";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ private async Task<int> GetPipelineAndDrainAsync(OptimisticDirectExecutionTestIn

internal static Tuple<PartitionedQueryExecutionInfo, QueryPartitionProvider> GetPartitionedQueryExecutionInfoAndPartitionProvider(string querySpecJsonString, PartitionKeyDefinition pkDefinition, bool clientDisableOde = false)
{
QueryPartitionProvider queryPartitionProvider = QueryPartitionProviderTestInstance.CreateModifiedQueryConfigPartitionProviderObject("clientDisableOptimisticDirectExecution", clientDisableOde.ToString().ToLower());
QueryPartitionProvider queryPartitionProvider = CreateCustomQueryPartitionProvider("clientDisableOptimisticDirectExecution", clientDisableOde.ToString().ToLower());
TryCatch<PartitionedQueryExecutionInfo> tryGetQueryPlan = queryPartitionProvider.TryGetPartitionedQueryExecutionInfo(
querySpecJsonString: querySpecJsonString,
partitionKeyDefinition: pkDefinition,
Expand Down Expand Up @@ -758,6 +758,44 @@ private static async Task<DocumentContainer> CreateDocumentContainerAsync(
return documentContainer;
}

private static QueryPartitionProvider CreateCustomQueryPartitionProvider(string key, string value)
{
Dictionary<string, object> queryEngineConfiguration = new Dictionary<string, object>()
{
{"maxSqlQueryInputLength", 262144},
{"maxJoinsPerSqlQuery", 5},
{"maxLogicalAndPerSqlQuery", 2000},
{"maxLogicalOrPerSqlQuery", 2000},
{"maxUdfRefPerSqlQuery", 10},
{"maxInExpressionItemsCount", 16000},
{"queryMaxGroupByTableCellCount", 500000 },
{"queryMaxInMemorySortDocumentCount", 500},
{"maxQueryRequestTimeoutFraction", 0.90},
{"sqlAllowNonFiniteNumbers", false},
{"sqlAllowAggregateFunctions", true},
{"sqlAllowSubQuery", true},
{"sqlAllowScalarSubQuery", true},
{"allowNewKeywords", true},
{"sqlAllowLike", true},
{"sqlAllowGroupByClause", true},
{"maxSpatialQueryCells", 12},
{"spatialMaxGeometryPointCount", 256},
{"sqlDisableQueryILOptimization", false},
{"sqlDisableFilterPlanOptimization", false},
{"clientDisableOptimisticDirectExecution", false}
};

if (key != null && value != null)
{
if (queryEngineConfiguration.TryGetValue(key, out _))
{
queryEngineConfiguration[key] = value;
}
}

return new QueryPartitionProvider(queryEngineConfiguration);
}

private static OptimisticDirectExecutionTestInput CreateInput(
string description,
string query,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ internal override Task<QueryPartitionProvider> QueryPartitionProvider
get
{
return Task.FromResult(new QueryPartitionProvider(
JsonConvert.DeserializeObject<Dictionary<string, object>>("{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"sqlAllowGroupByClause\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true,\"clientDisableOptimisticDirectExecution\":false}")));
JsonConvert.DeserializeObject<Dictionary<string, object>>("{\"maxSqlQueryInputLength\":262144,\"maxJoinsPerSqlQuery\":5,\"maxLogicalAndPerSqlQuery\":500,\"maxLogicalOrPerSqlQuery\":500,\"maxUdfRefPerSqlQuery\":10,\"maxInExpressionItemsCount\":16000,\"queryMaxInMemorySortDocumentCount\":500,\"maxQueryRequestTimeoutFraction\":0.9,\"sqlAllowNonFiniteNumbers\":false,\"sqlAllowAggregateFunctions\":true,\"sqlAllowSubQuery\":true,\"sqlAllowScalarSubQuery\":true,\"allowNewKeywords\":true,\"sqlAllowLike\":false,\"sqlAllowGroupByClause\":false,\"maxSpatialQueryCells\":12,\"spatialMaxGeometryPointCount\":256,\"sqlAllowTop\":true,\"enableSpatialIndexing\":true}")));
}
}

Expand Down