You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by "Surkov.Aleksandr" <al...@bk.ru> on 2020/07/10 14:34:07 UTC
Using SORT BY and ORDER BY
The org.apache.ignite.internal.processors.cache.query.CacheQuery interface
has a comment:
* {@code Group by} and {@code sort by} statements are applied
separately
* on each node, so result set will likely be incorrectly grouped or
sorted
* after results from multiple remote nodes are grouped together.
As far as I understand:
1. {@code sort by} does not supported
2. ORDER BY returns a sorted list even if items are on different nodes
It is right?
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Using SORT BY and ORDER BY
Posted by "Surkov.Aleksandr" <al...@bk.ru>.
Thank you!
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Using SORT BY and ORDER BY
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
By putting your affinity column in the public key of all tables and issuing
WITH "affinity_key=<column name>" clause when creating table.
Please also see https://apacheignite.readme.io/docs/affinity-collocation
Regards,
--
Ilya Kasnacheev
пт, 10 июл. 2020 г. в 18:32, Surkov.Aleksandr <al...@bk.ru>:
> There is the question. It turns out that I need to collocate the table,
> because the field COL will have different values?
> But how can i do this?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>
Re: Using SORT BY and ORDER BY
Posted by "Surkov.Aleksandr" <al...@bk.ru>.
There is the question. It turns out that I need to collocate the table,
because the field COL will have different values?
But how can i do this?
--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/
Re: Using SORT BY and ORDER BY
Posted by Ilya Kasnacheev <il...@gmail.com>.
Hello!
1. I guess it is a honest mistake.
2. The idea here is that you can't expect that GROUP BY COL will return
anything relevant, if the table is not collocated by COL.
Regards,
--
Ilya Kasnacheev
пт, 10 июл. 2020 г. в 17:34, Surkov.Aleksandr <al...@bk.ru>:
> The org.apache.ignite.internal.processors.cache.query.CacheQuery interface
> has a comment:
>
> * {@code Group by} and {@code sort by} statements are applied
> separately
> * on each node, so result set will likely be incorrectly grouped
> or
> sorted
> * after results from multiple remote nodes are grouped together.
>
> As far as I understand:
> 1. {@code sort by} does not supported
> 2. ORDER BY returns a sorted list even if items are on different nodes
>
> It is right?
>
>
>
> --
> Sent from: http://apache-ignite-users.70518.x6.nabble.com/
>