diff --git a/Directory.Build.props b/Directory.Build.props index 89cc974a3e1..69dc328a704 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -3,7 +3,7 @@ 3.38.1 3.39.0 preview.1 - 3.32.1 + 3.33.0 2.0.4 2.1.0 preview4 diff --git a/Microsoft.Azure.Cosmos/src/Regions.cs b/Microsoft.Azure.Cosmos/src/Regions.cs index aae88eb22bd..28a54b5def4 100644 --- a/Microsoft.Azure.Cosmos/src/Regions.cs +++ b/Microsoft.Azure.Cosmos/src/Regions.cs @@ -374,5 +374,15 @@ public static class Regions /// Name of the Azure Spain Central region in the Azure Cosmos DB service. /// public const string SpainCentral = "Spain Central"; + + /// + /// Name of the Azure Taiwan North region in the Azure Cosmos DB service. + /// + public const string TaiwanNorth = "Taiwan North"; + + /// + /// Name of the Azure Taiwan Northwest region in the Azure Cosmos DB service. + /// + public const string TaiwanNorthwest = "Taiwan Northwest"; } } diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.GroupBy.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.GroupBy.xml index c832978d6f6..3059db631af 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.GroupBy.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.GroupBy.xml @@ -311,14 +311,6 @@ GROUP BY c.age, c.name]]> - - min_age - Min - - - max_age - Max - count Count @@ -331,6 +323,14 @@ GROUP BY c.age, c.name]]> team null + + min_age + Min + + + max_age + Max + avg_age Average @@ -504,10 +504,6 @@ GROUP BY UPPER(c.name), SUBSTRING(c.address.city, 0, 3)]]> - - group_name - null - count Count @@ -516,6 +512,10 @@ GROUP BY UPPER(c.name), SUBSTRING(c.address.city, 0, 3)]]> info null + + group_name + null + info @@ -718,17 +718,13 @@ GROUP BY c.name]]> - max_age - Max + count + Count name null - - count - Count - $1 Min @@ -741,6 +737,10 @@ GROUP BY c.name]]> $2 Max + + max_age + Max + avg_age Average diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.NonValueAggregates.xml b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.NonValueAggregates.xml index df0a03b653c..29991e95757 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.NonValueAggregates.xml +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/BaselineTest/TestBaseline/QueryPlanBaselineTests.NonValueAggregates.xml @@ -509,11 +509,11 @@ FROM c]]> - min_blah2 + min_blah Min - min_blah + min_blah2 Min @@ -557,11 +557,11 @@ FROM c]]> - max_blah + max_blah2 Max - max_blah2 + max_blah Max @@ -605,11 +605,11 @@ FROM c]]> - avg_blah2 + avg_blah Average - avg_blah + avg_blah2 Average @@ -989,11 +989,11 @@ FROM c]]> - $1 + count_blah Count - count_blah + $1 Count @@ -1181,11 +1181,11 @@ FROM c]]> - max_blah + $1 Max - $1 + max_blah Max @@ -1229,11 +1229,11 @@ FROM c]]> - max_blah + $1 Max - $1 + max_blah Max @@ -1428,15 +1428,15 @@ FROM c]]> - $1 + count_blah Count - count_blah + count_blah2 Count - count_blah2 + $1 Count @@ -1486,11 +1486,11 @@ FROM c]]> Min - min_blah2 + min_blah Min - min_blah + min_blah2 Min @@ -1536,7 +1536,7 @@ FROM c]]> - max_blah + $1 Max @@ -1544,7 +1544,7 @@ FROM c]]> Max - $1 + max_blah Max @@ -1594,11 +1594,11 @@ FROM c]]> Average - avg_blah2 + avg_blah Average - avg_blah + avg_blah2 Average diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DirectContractTests.cs b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DirectContractTests.cs index c09cf3553c2..2b03a743902 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DirectContractTests.cs +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DirectContractTests.cs @@ -10,13 +10,11 @@ namespace Microsoft.Azure.Cosmos.Contracts using System.Linq; using System.Reflection; using System.Runtime.InteropServices; - using System.Text; using System.Text.RegularExpressions; using Microsoft.Azure.Cosmos.Query.Core.Monads; using Microsoft.Azure.Cosmos.Query.Core.QueryPlan; using Microsoft.Azure.Documents; using Microsoft.VisualStudio.TestTools.UnitTesting; - using Newtonsoft.Json; [TestCategory("Windows")] [TestClass] @@ -81,6 +79,21 @@ public void MappedRegionsTest() CollectionAssert.AreEquivalent(locationNames, cosmosRegions); } + [TestMethod] + public void RegionValueCheck() + { + string[] cosmosRegions = typeof(Regions) + .GetMembers(BindingFlags.Static | BindingFlags.Public) + .Select(e => e.Name) + .ToArray(); + foreach (string region in cosmosRegions) + { + string locationNameValue = typeof(LocationNames).GetField(region).GetValue(null).ToString(); + string regionNameValue = typeof(Regions).GetField(region).GetValue(null).ToString(); + Assert.AreEqual(locationNameValue, regionNameValue); + } + } + [TestMethod] public void RMContractTest() { diff --git a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json index aef32b7f9c9..85b292b8c57 100644 --- a/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json +++ b/Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.Tests/Contracts/DotNetSDKAPI.json @@ -7100,6 +7100,16 @@ "Attributes": [], "MethodInfo": "System.String SwitzerlandWest;IsInitOnly:False;IsStatic:True;" }, + "System.String TaiwanNorth": { + "Type": "Field", + "Attributes": [], + "MethodInfo": "System.String TaiwanNorth;IsInitOnly:False;IsStatic:True;" + }, + "System.String TaiwanNorthwest": { + "Type": "Field", + "Attributes": [], + "MethodInfo": "System.String TaiwanNorthwest;IsInitOnly:False;IsStatic:True;" + }, "System.String UAECentral": { "Type": "Field", "Attributes": [],