You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ignite.apache.org by pt...@apache.org on 2021/02/22 16:49:51 UTC

[ignite] branch master updated: IGNITE-5266 .NET: Add LongCount to LINQ provider

This is an automated email from the ASF dual-hosted git repository.

ptupitsyn pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ignite.git


The following commit(s) were added to refs/heads/master by this push:
     new ae08e1c   IGNITE-5266 .NET: Add LongCount to LINQ provider
ae08e1c is described below

commit ae08e1c257d4def25ebea02aa2d282190f37f9b1
Author: Kin (Nathan) Chan <31...@users.noreply.github.com>
AuthorDate: Mon Feb 22 10:49:16 2021 -0600

     IGNITE-5266 .NET: Add LongCount to LINQ provider
---
 .../Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Misc.cs    | 3 +++
 .../platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryModelVisitor.cs | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Misc.cs b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Misc.cs
index bc67ea7..9c8370b 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Misc.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Core.Tests/Cache/Query/Linq/CacheLinqTest.Misc.cs
@@ -127,6 +127,9 @@ namespace Apache.Ignite.Core.Tests.Cache.Query.Linq
 
             Assert.AreEqual(PersonCount, cache.Count());
             Assert.AreEqual(PersonCount, cache.Count(x => x.Key < PersonCount));
+            
+            Assert.AreEqual(PersonCount, cache.LongCount());
+            Assert.AreEqual(PersonCount, cache.LongCount(x => x.Key < PersonCount));
         }
 
         /// <summary>
diff --git a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryModelVisitor.cs b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryModelVisitor.cs
index da250e9..61e6c4b4 100644
--- a/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryModelVisitor.cs
+++ b/modules/platforms/dotnet/Apache.Ignite.Linq/Impl/CacheQueryModelVisitor.cs
@@ -224,7 +224,7 @@ namespace Apache.Ignite.Linq.Impl
 
             foreach (var op in queryModel.ResultOperators.Reverse())
             {
-                if (op is CountResultOperator || op is AnyResultOperator)
+                if (op is CountResultOperator || op is AnyResultOperator || op is LongCountResultOperator)
                 {
                     _builder.Append("count (");
                     parenCount++;