@Test
  public void testNestedQueryWithShortTypesFromInnerQuery() throws Exception {
    QueryService qs = CacheUtils.getQueryService();
    Region region1 = CacheUtils.createRegion("portfolios1", Portfolio.class);
    int numEntries = 1000;
    int numIds = 100;
    for (int i = 0; i < numEntries; i++) {
      Portfolio p = new Portfolio(i % (numIds));
      p.shortID = (short) p.ID;
      region1.put("" + i, p);
    }

    helpTestIndexForQuery(
        "<trace>SELECT * FROM " + SEPARATOR
            + "portfolios1 p where p.shortID in (SELECT p.shortID FROM " + SEPARATOR
            + "portfolios1 p WHERE p.shortID = 1)",
        "p.shortID", SEPARATOR + "portfolios1 p");
  }
Tests a nested query with shorts converted to integer types in the result set of the inner
query. The short field in the outer query should be evaluated against the integer types and
match.
geode-core/src/integrationTest/java/org/apache/geode/cache/query/functional/NestedQueryJUnitTest.java