Skip to content

Commit a7b127c

Browse files
authored
Merge pull request #416 from DataObjects-NET/7.1-decimal-sum-translation-issue
Addresses IndexOutOfRangeException on translation of certain queries with aggregates
2 parents d322115 + bbdaebb commit a7b127c

19 files changed

+3578
-10505
lines changed

ChangeLog/7.1.4_dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[main] Addressed IndexOutOfRangeException on translation of certain queries with aggregates

Orm/Xtensive.Orm.PostgreSql/Orm.Providers.PostgreSql/DomainHandler.cs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
using System.Linq;
1010
using Xtensive.Core;
1111
using Xtensive.Orm.Rse.Compilation;
12+
using Xtensive.Orm.Rse.Transformation;
1213

1314
namespace Xtensive.Orm.Providers.PostgreSql
1415
{
@@ -21,6 +22,12 @@ public class DomainHandler : Providers.DomainHandler
2122
protected override ICompiler CreateCompiler(CompilerConfiguration configuration) =>
2223
new SqlCompiler(Handlers, configuration);
2324

25+
protected override IPreCompiler CreatePreCompiler(CompilerConfiguration configuration)
26+
{
27+
var decimalAggregateCorrector = new AggregateOverDecimalColumnCorrector(Handlers.Domain.Model);
28+
return new CompositePreCompiler(decimalAggregateCorrector, base.CreatePreCompiler(configuration));
29+
}
30+
2431
/// <inheritdoc/>
2532
protected override IEnumerable<Type> GetProviderCompilerContainers()
2633
{

0 commit comments

Comments
 (0)