@Test
  public void testNonDistinctOrCondResults() throws Exception {


    Region region = CacheUtils.createRegion("pos", Portfolio.class);
    for (int i = 0; i < 10; i++) {
      region.put("" + i, new Portfolio(i));
    }

    for (int i = 10; i < 20; i++) {
      Portfolio p = new Portfolio(i);
      if (i % 2 == 0) {
        p.status = null;
      }
      region.put("" + i, p);
    }
    QueryService qs;
    qs = CacheUtils.getQueryService();
    String[] queries =
        {"SELECT * FROM " + SEPARATOR
            + "pos pf,  positions.values pos where pf.ID > 0 OR pf.status='active' OR  pos.secId != 'IBM'",
            "SELECT * FROM " + SEPARATOR + "pos pf where pf.ID > 0 OR pf.status='active'",
            "SELECT * FROM " + SEPARATOR + "pos pf where pf.ID > 0 OR pf.status LIKE 'act%'",
            "SELECT * FROM " + SEPARATOR
                + "pos pf where pf.ID > 0 OR pf.status IN SET('active', 'inactive')",};

    SelectResults[] sr = new SelectResults[queries.length];
    for (int i = 0; i < queries.length; i++) {
      Query q = null;
      try {
        q = CacheUtils.getQueryService().newQuery(queries[i]);
        QueryObserverImpl observer = new QueryObserverImpl();
        QueryObserverHolder.setInstance(observer);
        sr[i] = (SelectResults) q.execute();
        if (observer.isIndexesUsed) {
          fail("How could index be present when not created!?");
        }
      } catch (Exception e) {
        e.printStackTrace();
        fail(q.getQueryString());
      }
    }

    // Verify Results
    for (int i = 0; i < sr.length; i++) {
      Set resultSet = sr[i].asSet();

      // Check Element Type
      if (queries[i].contains("values")) {
        assertTrue("Checking Element type for Query: [" + queries[i] + "] results",
            sr[i].getCollectionType().getElementType().toString().equals(
                "struct<pf:org.apache.geode.cache.query.data.Portfolio,pos:java.lang.Object>"));
        // Check Size of results
        assertEquals("Checking Element type for Query: [" + queries[i] + "] results", 40,
            resultSet.size());
      } else {
        assertTrue("Checking Element type for Query: [" + queries[i] + "] results",
            sr[i].getCollectionType().getElementType().toString()
                .equals("org.apache.geode.cache.query.data.Portfolio"));
        // Check Size of results
        assertEquals("Checking Element type for Query: [" + queries[i] + "] results", 20,
            resultSet.size());
      }

      for (final Object obj : resultSet) {
        if (sr[i].getCollectionType().getElementType().toString().equals(
            "struct<pf:org.apache.geode.cache.query.data.Portfolio,pos:java.lang.Object>")) {
          Object[] values = ((Struct) obj).getFieldValues();
          Portfolio port = (Portfolio) values[0];
          Position pos = (Position) values[1];
          if (!(port.getID() > 0 || port.status.equals("active") || pos.secId.equals("IBM"))) {
            fail("Result object" + obj
                + " failed to satisfy all OR conditions of where clause of query " + queries[i]);
          }
        } else {
          Portfolio port = (Portfolio) obj;
          if (!(port.getID() > 0 || port.status.equals("active"))) {
            fail("Result object" + port
                + " failed to satisfy all OR conditions of where clause of query " + queries[i]);
          }
        }
      }
    }
  }
Test index usage on PR region & Local region if the where clause contains three conditions with
two conditions indexed & the total number of from clause iterators is 1.
geode-core/src/integrationTest/java/org/apache/geode/cache/query/functional/IndexWithSngleFrmAndMultCondQryJUnitTest.java