Uploaded image for project: 'Hot Rod Native client'
  1. Hot Rod Native client
  2. HRCPP-303

Calling COUNT function on empty field returns empty string instead of 0

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Minor Minor
    • 8.1.0.Beta1, 8.1.0.Final
    • None
    • .NET
    • None

      The following test fails when "age" is not assigned for any user in a group during creating users in the cache.

                  IRemoteCache<int, User> userCache = remoteManager.GetCache<int, User>(NAMED_CACHE);
      
                  QueryRequest qr = new QueryRequest();
                  qr.JpqlString = "select u.name, count(u.age) from sample_bank_account.User u group by u.name";
      
                  QueryResponse result = userCache.Query(qr);
      
                  List<Object[]> projections = unwrapWithProjection(result);
      
                  Assert.AreEqual(2, projections.Count);
                  Assert.AreEqual("John" ,projections.ElementAt(0)[0]);
                  Assert.AreEqual(1, projections.ElementAt(0)[1]);
                  Assert.AreEqual("Spider", projections.ElementAt(1)[0]);
                  Assert.AreEqual(0, projections.ElementAt(1)[1]);
                 //^^^^ fails here, the the element is an empty string instead of 0
      

              vrigamon@redhat.com Vittorio Rigamonti
              mgencur Martin Gencur
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: