[ 
https://issues.apache.org/jira/browse/IGNITE-4252?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Alexey Kuznetsov updated IGNITE-4252:
-------------------------------------
    Description: 
Try to send query for local cache to partitioned cache for executing:

Two caches: local_cache & partitioned_cache.

// SQL query performed on local_cache, but entry point is partitioned_cache.
ignite.cache("partitioned_cache").query(new SqlFieldsQuery("select * from 
"local_cache".Table"))

{code}
java.lang.ClassCastException: 
org.apache.ignite.internal.processors.cache.local.atomic.GridLocalAtomicCache 
cannot be cast to 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter
        at 
org.apache.ignite.internal.processors.cache.GridCacheContext.topology(GridCacheContext.java:853)
        at 
org.apache.ignite.internal.processors.cache.GridCacheContext.topology(GridCacheContext.java:831)
        at 
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.hasMovingPartitions(GridReduceQueryExecutor.java:389)
        at 
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.isPreloadingActive(GridReduceQueryExecutor.java:376)
        at 
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:520)
        at 
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$5.iterator(IgniteH2Indexing.java:1089)
        at 
org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:81)
{code}


  was:
Try to send query for local cache to partitioned cache for executing:

select * from "local_cache".Table

{code}
java.lang.ClassCastException: 
org.apache.ignite.internal.processors.cache.local.atomic.GridLocalAtomicCache 
cannot be cast to 
org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter
        at 
org.apache.ignite.internal.processors.cache.GridCacheContext.topology(GridCacheContext.java:853)
        at 
org.apache.ignite.internal.processors.cache.GridCacheContext.topology(GridCacheContext.java:831)
        at 
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.hasMovingPartitions(GridReduceQueryExecutor.java:389)
        at 
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.isPreloadingActive(GridReduceQueryExecutor.java:376)
        at 
org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:520)
        at 
org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$5.iterator(IgniteH2Indexing.java:1089)
        at 
org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:81)
{code}



> ClassCastException with local cache query
> -----------------------------------------
>
>                 Key: IGNITE-4252
>                 URL: https://issues.apache.org/jira/browse/IGNITE-4252
>             Project: Ignite
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Pavel Konstantinov
>
> Try to send query for local cache to partitioned cache for executing:
> Two caches: local_cache & partitioned_cache.
> // SQL query performed on local_cache, but entry point is partitioned_cache.
> ignite.cache("partitioned_cache").query(new SqlFieldsQuery("select * from 
> "local_cache".Table"))
> {code}
> java.lang.ClassCastException: 
> org.apache.ignite.internal.processors.cache.local.atomic.GridLocalAtomicCache 
> cannot be cast to 
> org.apache.ignite.internal.processors.cache.distributed.dht.GridDhtCacheAdapter
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheContext.topology(GridCacheContext.java:853)
>       at 
> org.apache.ignite.internal.processors.cache.GridCacheContext.topology(GridCacheContext.java:831)
>       at 
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.hasMovingPartitions(GridReduceQueryExecutor.java:389)
>       at 
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.isPreloadingActive(GridReduceQueryExecutor.java:376)
>       at 
> org.apache.ignite.internal.processors.query.h2.twostep.GridReduceQueryExecutor.query(GridReduceQueryExecutor.java:520)
>       at 
> org.apache.ignite.internal.processors.query.h2.IgniteH2Indexing$5.iterator(IgniteH2Indexing.java:1089)
>       at 
> org.apache.ignite.internal.processors.cache.QueryCursorImpl.iterator(QueryCursorImpl.java:81)
> {code}



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

Reply via email to