geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GEODE-90) IN SET Query using Index throws IllegalArgumentException
Date Mon, 13 Jul 2015 17:20:05 GMT

    [ https://issues.apache.org/jira/browse/GEODE-90?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14624978#comment-14624978
] 

ASF subversion and git services commented on GEODE-90:
------------------------------------------------------

Commit 5e1460df69cf3a83330b46b06dc8b859fe396cb5 in incubator-geode's branch refs/heads/develop
from [~huynhja]
[ https://git-wip-us.apache.org/repos/asf?p=incubator-geode.git;h=5e1460d ]

GEODE-90: IN SET Query using Index throws IllegalArgumentException

Add iterated object instead of the collection of objects to query results
Reviewed by Anil, Kirk


> IN SET Query using Index throws IllegalArgumentException
> --------------------------------------------------------
>
>                 Key: GEODE-90
>                 URL: https://issues.apache.org/jira/browse/GEODE-90
>             Project: Geode
>          Issue Type: Bug
>          Components: querying
>            Reporter: Jason Huynh
>            Assignee: Jason Huynh
>
> The following test will fail:
>  public void testQueryRVMapMultipleEntries() throws Exception {
>       Cache cache = CacheUtils.getCache();
>       QueryService queryService = CacheUtils.getCache().getQueryService();
>       CacheUtils.createRegion("TEST_REGION", null);
>       queryService.createIndex("tr.nested.id.index", "nested.id", "/TEST_REGION, nested
IN nested_values");
>       Query queryInSet = queryService.newQuery("SELECT DISTINCT tr.id FROM /TEST_REGION
tr, tr.nested_values nested WHERE nested.id IN SET ('1')");
>       Query queryEquals = queryService.newQuery("SELECT DISTINCT tr.id FROM /TEST_REGION
tr, nested IN nested_values WHERE nested.id='1'");
>       Object[] nested = new Object[] {
>               cache.createPdxInstanceFactory("nested_1").writeString("id", "1").create(),
>               cache.createPdxInstanceFactory("nested_2").writeString("id", "1").create(),
>               cache.createPdxInstanceFactory("nested_3").writeString("id", "1").create(),
>               cache.createPdxInstanceFactory("nested_4").writeString("id", "4").create()
>       };
>       PdxInstance record = cache.createPdxInstanceFactory("root").writeString("id", "2").writeObjectArray("nested_values",
nested).create();
>       cache.getRegion("TEST_REGION").put("100", record);
>       Index index = cache.getQueryService().getIndex(cache.getRegion("TEST_REGION"),
"mdf.testRegion.nested.id");
>       SelectResults queryResults = (SelectResults) queryEquals.execute();
>       SelectResults inSetQueryResults = (SelectResults) queryInSet.execute();
>       assertEquals(queryResults.size(), inSetQueryResults.size());
>       assertTrue(inSetQueryResults.size() > 0);
>   }
> AbstractIndex is adding the whole collection as an object into the result set instead
of the individual object.



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

Mime
View raw message