You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/06/06 18:15:18 UTC

[jira] [Commented] (IGNITE-5188) Support AFFINITY KEY keyword for CREATE TABLE command

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

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

GitHub user alexpaschenko opened a pull request:

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

    IGNITE-5188

    

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

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

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

    https://github.com/apache/ignite/pull/2097.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 #2097
    
----
commit 12506505bf2a56c14701e09c746ab9d17a27a034
Author: Alexander Paschenko <al...@gmail.com>
Date:   2017-06-05T17:59:32Z

    IGNITE-5188 Affinity key SQL param.

commit e59247ab5b3c6ea4e118e8d5bc2a12a6cb70b1b6
Author: Alexander Paschenko <al...@gmail.com>
Date:   2017-06-06T11:53:44Z

    IGNITE-5188 Affinity key SQL param test.

commit 1306227625474427a76f74f400f76f3ba7967326
Author: Alexander Paschenko <al...@gmail.com>
Date:   2017-06-06T11:56:49Z

    Merge remote-tracking branch 'apache/master' into ignite-5188
    
    # Conflicts:
    #	modules/core/src/main/java/org/apache/ignite/internal/processors/query/GridQueryProcessor.java
    #	modules/indexing/src/main/java/org/apache/ignite/internal/processors/query/h2/ddl/DdlStatementsProcessor.java
    #	modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicTableSelfTest.java

commit a6a250db1c624f711037e324f338d194494e1c2d
Author: Alexander Paschenko <al...@gmail.com>
Date:   2017-06-06T15:40:33Z

    IGNITE-5188 BinaryFieldNameAffinityKeyMapper

commit b3c9eccc8e38f33750ace494b16e3ce8f8ce1236
Author: Alexander Paschenko <al...@gmail.com>
Date:   2017-06-06T15:41:15Z

    Merge remote-tracking branch 'apache/master' into ignite-5188
    
    # Conflicts:
    #	modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/index/H2DynamicTableSelfTest.java

commit 148f210b71218113edd12a48e3e4ae81af1cf58f
Author: devozerov <vo...@gridgain.com>
Date:   2017-06-06T16:05:30Z

    Review.

commit 3590c72a806524669d8d5c2f04a9ce71bfcbaefe
Author: Alexander Paschenko <al...@gmail.com>
Date:   2017-06-06T18:13:43Z

    IGNITE-5188 Review fixes.

commit 9743802b24ac93a1532265ea261e301c9d4de557
Author: Alexander Paschenko <al...@gmail.com>
Date:   2017-06-06T18:14:08Z

    Merge remote-tracking branch 'apache/master' into ignite-5188

----


> Support AFFINITY KEY keyword for CREATE TABLE command
> -----------------------------------------------------
>
>                 Key: IGNITE-5188
>                 URL: https://issues.apache.org/jira/browse/IGNITE-5188
>             Project: Ignite
>          Issue Type: Task
>          Components: sql
>            Reporter: Vladimir Ozerov
>            Assignee: Alexander Paschenko
>             Fix For: 2.1
>
>
> We need to be able to specify affinity key for cache created through {{CREATE TABLE}} command to support data co-location properly. It seems that correct way to support this is as follows:
> 1) We need to define special SQL affinity mapper which will accept type name and field name.
> 2) Mapper logic: if type name matches, then get affinity field. Otherwise return the whole object. 
> 3) Performance consideration: we should avoid string comparisons. Instead, we should resolve type name to type ID on first access, and then compare only IDs.
> 4) We should fix on how we obtain affinity key for type descriptor in {{QueryUtils.typeForQueryEntity}} - we should try consulting to special SQL mapper first, if it is defined.
> 5) Last (hopefully), we should make sure that affinity routing is not broken. See {{GridH2Table.ctor}} - here we should rely on existing affinity column from SQL mapper if one is defined.
>  



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)