You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Jason Huynh (JIRA)" <ji...@apache.org> on 2015/07/10 00:34:04 UTC

[jira] [Created] (GEODE-91) Zero results when querying against a HashIndex indexed on PdxStrings

Jason Huynh created GEODE-91:
--------------------------------

             Summary: Zero results when querying against a HashIndex indexed on PdxStrings 
                 Key: GEODE-91
                 URL: https://issues.apache.org/jira/browse/GEODE-91
             Project: Geode
          Issue Type: Bug
            Reporter: Jason Huynh
            Assignee: Jason Huynh


When a hash index is indexed on a pdx string, the hash index on reevaluation will not correctly compare the strings.
The following test will fail:

public void testPdxWithStringIndexKeyValues() throws Exception {
    createPartitionedRegion("test_region");
    int numEntries = 10;
    Index index = qs.createHashIndex("idHash", "p.id", "/test_region p");
    for (int i = 0; i < numEntries; i++) {
      PdxInstance record = CacheUtils.getCache().createPdxInstanceFactory("test_region").writeString("id", "" + i).writeString("domain", "A").create();
      region.put("" + i, record);
    }

    SelectResults results = (SelectResults) qs.newQuery(
        "SELECT DISTINCT tr.domain FROM /test_region tr WHERE tr.id='1'").execute();
    assertEquals(1, results.size());
    assertTrue(observer.indexUsed);
  }



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)