You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Vladimir Ozerov (JIRA)" <ji...@apache.org> on 2017/09/14 06:58:00 UTC
[jira] [Commented] (IGNITE-6375) CREATE TABLE affinityKey parameter
doesn't work as expected
[ https://issues.apache.org/jira/browse/IGNITE-6375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16165844#comment-16165844 ]
Vladimir Ozerov commented on IGNITE-6375:
-----------------------------------------
[~dmagda], confirming. DDL part is fine - affinity key field name is passed to cache configuration. However, for some reason it is not interpreted by cache correctly.
> 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
> Priority: Blocker
> Fix For: 2.2
>
>
> 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)