-
Bug
-
Resolution: Done
-
Minor
-
JDG 7.1.0 CR1
-
None
The following test started to fail (it was not failing until indexNullAs was introduced):
[Test]
public void CountTest()
{
IRemoteCache<int, User> userCache = remoteManager.GetCache<int, User>(NAMED_CACHE);
QueryRequest qr = new QueryRequest();
qr.QueryString = "select u.name, count(u.age) from sample_bank_account.User u group by u.name";
QueryResponse result = userCache.Query(qr);
List<Object[]> projections = RemoteQueryUtils.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 where it returns 2 even though age was not set for Spiders
}
The "age" field is declared in the Proto schema as follows:
/*
@Field(store = Store.YES, indexNullAs = "-1")
*/
optional int32 age = 6;
Note: The age field is counted even when indexNullAs = "0"