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

ASF GitHub Bot commented on IGNITE-6375:
----------------------------------------

GitHub user devozerov opened a pull request:

    https://github.com/apache/ignite/pull/2660

    IGNITE-6375

    

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/gridgain/apache-ignite ignite-6375

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/ignite/pull/2660.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #2660
    
----
commit 77b7c98202c1ab9e476610b262b2bd999a2186b5
Author: devozerov <[email protected]>
Date:   2017-09-14T08:32:02Z

    Better affinity collocation for CREATE TABLE.

----


> CREATE TABLE affinityKey parameter doesn't work as expected
> -----------------------------------------------------------
>
>                 Key: IGNITE-6375
>                 URL: https://issues.apache.org/jira/browse/IGNITE-6375
>             Project: Ignite
>          Issue Type: Bug
>          Components: sql
>    Affects Versions: 2.1
>            Reporter: Denis Magda
>            Assignee: Vladimir Ozerov
>             Fix For: 2.3
>
>
> Start a couple of cluster nodes and preload the data using SQLLine tool and 
> an SQL script as described here:
> https://github.com/dmagda/ignite_world_demo
> The SQL tables are couple by affinity principle, check the script. However, 
> when I try to execute this query with a JOIN
> {code}
> SELECT country.name, city.name, MAX(city.population) as max_pop FROM country
>     JOIN city ON city.countrycode = country.code
>     WHERE country.code IN ('USA','RUS','CHN')
>     GROUP BY country.name, city.name ORDER BY max_pop DESC LIMIT 3
> {code}
> then get a wrong result
> {noformat}
> United States New York 8008278
> United States Los Angeles 3694820
> United States Chicago 2896016
> {noformat}
> The correct result is the following:
> {noformat}
> China Shanghai 9696300
> Russian Federation Moscow 8389200
> United States New York 8008278
> {noformat}
> But you have to force {{non-collocated}} joins to get it. 
> All this means that {{affinityKey}} parameter of CREATE TABLE doesn't work 
> properly or there is an issue with DML.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to