ignite-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sascha Hofer (JIRA)" <j...@apache.org>
Subject [jira] [Created] (IGNITE-7483) Queries: transformers are not executed when paging the result
Date Mon, 22 Jan 2018 08:22:01 GMT
Sascha Hofer created IGNITE-7483:
------------------------------------

             Summary: Queries: transformers are not executed when paging the result
                 Key: IGNITE-7483
                 URL: https://issues.apache.org/jira/browse/IGNITE-7483
             Project: Ignite
          Issue Type: Bug
          Components: cache
    Affects Versions: 2.3
            Reporter: Sascha Hofer


It seems that transformers are not executed during pagination which leads to {{ClassCastExceptions}}
because the result list also contains instances of {{GridCacheQueryResponseEntry}}.

To reproduce open {{GridCacheQueryTransformerSelfTest.testGetKeys()}} and set a page size
of 1 so that

{code:java}
List<Integer> keys = cache.query(new ScanQuery<Integer, String>(), transformer).getAll();
{code}

becomes to

{code:java}
List<Integer> keys = cache.query(new ScanQuery<Integer, String>().setPageSize(1),
transformer).getAll();
{code}

this leads to following stack trace:
{noformat}
java.lang.ClassCastException: org.apache.ignite.internal.processors.cache.query.GridCacheQueryResponseEntry
cannot be cast to java.lang.Comparable

	at java.util.ComparableTimSort.binarySort(ComparableTimSort.java:249)
	at java.util.ComparableTimSort.sort(ComparableTimSort.java:207)
	at java.util.Arrays.sort(Arrays.java:1312)
	at java.util.Arrays.sort(Arrays.java:1506)
	at java.util.ArrayList.sort(ArrayList.java:1454)
	at java.util.Collections.sort(Collections.java:141)
	at org.apache.ignite.internal.processors.cache.query.GridCacheQueryTransformerSelfTest.testGetKeys(GridCacheQueryTransformerSelfTest.java:102)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at junit.framework.TestCase.runTest(TestCase.java:176)
	at org.apache.ignite.testframework.junits.GridAbstractTest.runTestInternal(GridAbstractTest.java:2001)
	at org.apache.ignite.testframework.junits.GridAbstractTest.access$000(GridAbstractTest.java:133)
	at org.apache.ignite.testframework.junits.GridAbstractTest$5.run(GridAbstractTest.java:1916)
	at java.lang.Thread.run(Thread.java:745)
{noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message