You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Pavel Kuznetsov (JIRA)" <ji...@apache.org> on 2018/11/06 15:21:00 UTC

[jira] [Comment Edited] (IGNITE-9989) JDBC v2: getPrimaryKeys always returns constant COLUMN_NAME, KEY_SEQ, PK_NAME

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

Pavel Kuznetsov edited comment on IGNITE-9989 at 11/6/18 3:20 PM:
------------------------------------------------------------------

[~tledkov-gridgain] Cold you please perform prelementary review?

I need your comments
1) do we need name normalization for table name? should we use {{org.apache.ignite.internal.processors.query.QueryUtils#tableName}} instead of getter of QueryEntity?

2) Please take a look at {{org.apache.ignite.internal.processors.query.QueryUtils#primaryKeyColumns}} :
I've got case when I had {{keyFieldName == null}} in the QueryEntity and empty {{keyFields}}.
In this case we have AffinityKey as a key. 



was (Author: pkouznet):
[~tledkov-gridgain] Cold you please perform prelementary review?

I need your comments
1) do we need name normalization for table name? should we use {{org.apache.ignite.internal.processors.query.QueryUtils#tableName}} instead of getter of QueryEntity

2) Please take a look at {{org.apache.ignite.internal.processors.query.QueryUtils#primaryKeyColumns}} :
I've got case when I had {{keyFieldName == null}} in the QueryEntity and empty {{keyFields}}. 


> JDBC v2: getPrimaryKeys always returns constant COLUMN_NAME, KEY_SEQ, PK_NAME
> -----------------------------------------------------------------------------
>
>                 Key: IGNITE-9989
>                 URL: https://issues.apache.org/jira/browse/IGNITE-9989
>             Project: Ignite
>          Issue Type: Bug
>    Affects Versions: 2.6
>            Reporter: Pavel Kuznetsov
>            Assignee: Pavel Kuznetsov
>            Priority: Major
>              Labels: jdbc
>
> Jdbc v2 driver has hardcoded values for meta attibutes : 
> COLUMN_NAME = _KEY 
> KEY_SEQ = 1
> PK_NAME = _KEY
> But this values should be different for different tables.
> how to reproduce: 
> 1) connect to the cluser using jdbcv2 driver
> 2) CREATE TABLE TAB (ID LONG, SEC_ID LONG, VAL LONG, PRIMARY KEY(ID, SEC_ID))
> 3) check result of connection.getMetadata().getPrimaryKeys()



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)