@Test
  public void test007UndefinedResults() {
    CacheUtils.log("testQueryExceptionLogMessage");
    Region region = CacheUtils.createRegion("Portfolios", Portfolio.class);
    region.put("1", new Portfolio(1));
    region.put("2", new Portfolio(0));
    String queryStr = "SELECT DISTINCT * FROM " + SEPARATOR + "Portfolios.ketset";
    Query q = CacheUtils.getQueryService().newQuery(queryStr);
    Object results = null;

    try {
      results = q.execute();
    } catch (Exception e) {
      fail("Query execution failed " + e);
    }
    assertEquals(0, ((SelectResults) results).size());

    PartitionAttributesFactory paf = new PartitionAttributesFactory();
    AttributesFactory af = new AttributesFactory();
    af.setPartitionAttributes(paf.create());

    region = CacheUtils.createRegion("PortfoliosPR", af.create(), false);
    region.put("1", new Portfolio(1));
    region.put("2", new Portfolio(0));
    queryStr = "SELECT DISTINCT * FROM " + SEPARATOR + "PortfoliosPR.ketset";
    q = CacheUtils.getQueryService().newQuery(queryStr);
    try {
      results = q.execute();
    } catch (Exception e) {
      fail("Query execution failed " + e);
    }
    assertEquals(0, ((SelectResults) results).size());
  }
***
THIS FILE IS ENCODED IN UTF-8 IN ORDER TO TEST UNICODE IN FIELD NAMES. THE ENCODING MUST BE
SPECIFIED AS UTF-8 WHEN COMPILED
*****
geode-core/src/integrationTest/java/org/apache/geode/cache/query/QueryJUnitTest.java