Skip to content

Commit

Permalink
Merged from master
Browse files Browse the repository at this point in the history
  • Loading branch information
MarkMpn committed Jan 18, 2022
2 parents 0eabe32 + 1e2f5da commit 60a6586
Show file tree
Hide file tree
Showing 99 changed files with 3,353 additions and 2,899 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,7 @@
<None Include="app.config" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MarkMpn.Sql4Cds.Engine.FetchXml\MarkMpn.Sql4Cds.Engine.FetchXml.csproj">
<Project>{ca534229-43ff-4bd4-9c60-182f56936ac3}</Project>
<Name>MarkMpn.Sql4Cds.Engine.FetchXml</Name>
</ProjectReference>
</ItemGroup>
<Import Project="..\MarkMpn.Sql4Cds.Engine\MarkMpn.Sql4Cds.Engine.FetchXml.projitems" Label="Shared" />
<Import Project="$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets" Condition="Exists('$(VSToolsPath)\TeamTest\Microsoft.TestTools.targets')" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
Expand Down
36 changes: 0 additions & 36 deletions MarkMpn.Sql4Cds.Engine.FetchXml/Properties/AssemblyInfo.cs

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<AssemblyName>MarkMpn.Sql4Cds.Engine</AssemblyName>
<RootNamespace>MarkMpn.Sql4Cds.Engine</RootNamespace>
</PropertyGroup>

<Import Project="..\MarkMpn.Sql4Cds.Engine\MarkMpn.Sql4Cds.Engine.projitems" Label="Shared" />

<ItemGroup>
<PackageReference Include="Microsoft.PowerPlatform.Dataverse.Client" Version="0.5.10" />
<PackageReference Include="Microsoft.SqlServer.TransactSql.ScriptDom" Version="150.4897.1" />
<PackageReference Include="System.Data.SqlClient" Version="4.8.3" />
</ItemGroup>

</Project>
File renamed without changes.
83 changes: 83 additions & 0 deletions MarkMpn.Sql4Cds.Engine.NetFx/MarkMpn.Sql4Cds.Engine.NetFx.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{23288BB2-0D6F-4329-9A5C-4C659567A652}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>MarkMpn.Sql4Cds.Engine</RootNamespace>
<AssemblyName>MarkMpn.Sql4Cds.Engine</AssemblyName>
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup>
<SignAssembly>true</SignAssembly>
</PropertyGroup>
<PropertyGroup>
<AssemblyOriginatorKeyFile>Key.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<ItemGroup>
<Reference Include="Microsoft.VisualBasic" />
<Reference Include="System" />
<Reference Include="System.Core" />
<Reference Include="System.DirectoryServices" />
<Reference Include="System.DirectoryServices.AccountManagement" />
<Reference Include="System.IdentityModel" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.Security" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.ServiceModel.Web" />
<Reference Include="System.Web" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CrmSdk.CoreAssemblies">
<Version>9.0.2.33</Version>
</PackageReference>
<PackageReference Include="Microsoft.CrmSdk.XrmTooling.CoreAssembly">
<Version>9.1.0.79</Version>
</PackageReference>
<PackageReference Include="Microsoft.SourceLink.GitHub">
<Version>1.0.0</Version>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
<PrivateAssets>all</PrivateAssets>
</PackageReference>
<PackageReference Include="Microsoft.SqlServer.TransactSql.ScriptDom">
<Version>150.4897.1</Version>
</PackageReference>
</ItemGroup>
<ItemGroup>
<None Include="Key.snk" />
</ItemGroup>
<Import Project="..\MarkMpn.Sql4Cds.Engine\MarkMpn.Sql4Cds.Engine.projitems" Label="Shared" />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
37 changes: 37 additions & 0 deletions MarkMpn.Sql4Cds.Engine.Tests/ExecutionPlanNodeTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -511,5 +511,42 @@ public void TableSpoolTest()
CollectionAssert.AreEqual(new[] { 1, 2 }, results2);
Assert.AreEqual(1, source.ExecutionCount);
}

[TestMethod]
public void CaseInsenstiveHashMatchAggregateNodeTest()
{
var source = new ConstantScanNode
{
Values =
{
new Entity{["value1"] = new SqlString("hello", CultureInfo.CurrentCulture.LCID, SqlCompareOptions.IgnoreCase | SqlCompareOptions.IgnoreNonSpace)},
new Entity{["value1"] = new SqlString("Hello", CultureInfo.CurrentCulture.LCID, SqlCompareOptions.IgnoreCase | SqlCompareOptions.IgnoreNonSpace)}
},
Schema =
{
["value1"] = typeof(SqlString).ToSqlType()
},
Alias = "src"
};

var spool = new HashMatchAggregateNode
{
Source = source,
GroupBy =
{
"src.value1".ToColumnReference()
},
Aggregates =
{
["count"] = new Aggregate { AggregateType = AggregateType.CountStar }
}
};

var results = spool.Execute(_dataSources, new StubOptions(), null, null)
.Select(e => new { Name = e.GetAttributeValue<SqlString>("src.value1").Value, Count = e.GetAttributeValue<SqlInt32>("count").Value })
.ToArray();

CollectionAssert.AreEqual(new[] { new { Name = "hello", Count = 2 } }, results);
}
}
}
Loading

0 comments on commit 60a6586

Please sign in to comment.