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

Query with ordering throws NumberFormatException

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 8.1.0.Final
    • 8.1.0.CR1
    • .NET
    • None

    Description

      After resolving ISPN-5729 it should be possible to call queries with sorting. However the following test fails with NumberFormatException. The stacktrace is also below.

      [Test]
              public void ContainsAnyTest()
              {
                  IRemoteCache<int, User> userCache = remoteManager.GetCache<int, User>(NAMED_CACHE);
      
                  QueryRequest qr = new QueryRequest();
                  qr.QueryString = "from sample_bank_account.User u where u.accountIds = 2 or u.accountIds = 3 order by u.id asc";
      
                  QueryResponse result = userCache.Query(qr);
                  List<User> listOfUsers = RemoteQueryUtils.unwrapResults<User>(result);
      
                  Assert.AreEqual(2, listOfUsers.Count);
                  Assert.AreEqual(1, listOfUsers.ElementAt(0).Id);
                  Assert.AreEqual(2, listOfUsers.ElementAt(1).Id);
              }
      

      Stacktrace:

       Errors and Failures:
      4: 1) Test Error : Infinispan.HotRod.Tests.RemoteQueryTest.ContainsAnyTest
      4:    Infinispan.HotRod.Exceptions.HotRodClientException : java.lang.NumberFormatException: Invalid shift value in prefixCoded bytes (is encoded value really an INT?)
      4:    at Infinispan.HotRod.SWIGGen.RemoteByteArrayCache.query(VectorByte qr, UInt32 size) in C:\workdir\dotnet-client\build_windows\swig\RemoteByteArrayCache.cs:line 310
      4:    at Infinispan.HotRod.Impl.RemoteCacheSWIGGenImpl`2.Query(QueryRequest qr) in C:\workdir\dotnet-client\src\main\cs\Infinispan\HotRod\Impl\RemoteCacheSWIGImpl.cs:line 242
      4:    at Infinispan.HotRod.Tests.RemoteQueryTest.ContainsAnyTest() in C:\workdir\dotnet-client\src\test\cs\Infinispan\HotRod\RemoteQueryTest.cs:line 388
      

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: