ptupitsyn commented on code in PR #1460:
URL: https://github.com/apache/ignite-3/pull/1460#discussion_r1055115481


##########
modules/platforms/dotnet/Apache.Ignite.Tests/Linq/LinqTests.Aggregate.cs:
##########
@@ -156,4 +158,39 @@ public void TestAny()
         // Additional Where.
         Assert.IsFalse(PocoView.AsQueryable().Where(x => x.Key > 7).Any(x => 
x.Key < 5));
     }
+
+    [Test]
+    public void TestAggregateNullableDouble()
+    {
+        var query = PocoAllColumnsSqlNullableView.AsQueryable();
+
+        double? sumNotNull = query.Sum(x => x.Double);
+        double? sumNull = query.Where(x => x.Double == null).Sum(x => 
x.Double);
+
+        Assert.AreEqual(110d, sumNotNull);
+        Assert.IsNull(sumNull);
+    }
+
+    [Test]
+    public void TestAggregateNullableAllTypes()
+    {
+        Test(q => q.Sum(x => x.Int8));
+        Test(q => q.Sum(x => x.Int16));
+        Test(q => q.Sum(x => x.Int32));
+        Test(q => q.Sum(x => x.Int64));
+        Test(q => q.Sum(x => x.Float));
+        Test(q => q.Sum(x => x.Double));
+        Test(q => q.Sum(x => x.Decimal));
+
+        void Test<T>(Func<IQueryable<PocoAllColumnsSqlNullable>, T> sumFunc)
+        {
+            var query = PocoAllColumnsSqlNullableView.AsQueryable();
+
+            var sumNotNull = sumFunc(query);
+            var sumNull = sumFunc(query.Where(x => x.Double == null));

Review Comment:
   Can you please clarify? This is `TestAggregateNullableAllTypes`, which only 
tests summing nullable values.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to