Hi Anil,

Query 1 results looks ok. You got different results as affinity key is
equipmentId, but not serialnumber.
Query 2 has aggregates in subquery that is not supported yet [1].

[1] https://issues.apache.org/jira/browse/IGNITE-3860.


On Sat, Feb 11, 2017 at 7:18 PM, Anil <[email protected]> wrote:

>
> Hi team,
>
> i fee this is a bug. i have loaded cache with affinity key and group by
> queries on non affinity key returning results per node with both collocate
> = true/false.
>
> i have any created INSTALL_BASE cache with key as AffinityKey<String> and
> value is InstallBase pojo. and affinity key is equipmentId
>
>
>
> *Query 1 -*
>
> SELECT count (*) as count, serialnumber  FROM InstallBase where
> serialnumber= '0000031438' group by serialnumber= '0000031438'
>
> Results - on 4 node cluster
> *With collocated = true* :
>
> 1 -  0000031438
> 3 -  0000031438
>
> *With collocated = false* :
>
> 4 -  0000031438
>
> *Query 2 -*
>
> Select ib.*, p.count from installbase ib join (SELECT serialnumber , count
> (*) as count FROM InstallBase group by serialnumber) p on ib.serialnumber =
> p.serialnumber and ib.serialnumber = '0000031438'
>
> *With collocated = true* :
>
> 1 -  0000031438
> 3 -  0000031438
> 3 -  0000031438
> 3 -  0000031438
>
> *With collocated = false* :
>
> 1 -  0000031438
> 3 -  0000031438
> 3 -  0000031438
> 3 -  0000031438
>
>
> I see similar behavior with count queries as well.
>
> i strongly feel this is not correct behavior. Group by query on non
> affinity field is very common usecase. please share your view on this.
>
> Thanks
>



-- 
Best regards,
Andrey V. Mashenkov

Reply via email to