[jira] [Commented] (IGNITE-4643) JdbcDatabaseMetadata.getIndexInfo() method not working

2017-08-23 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on IGNITE-4643:


Github user asfgit closed the pull request at:

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


> JdbcDatabaseMetadata.getIndexInfo() method not working
> --
>
> Key: IGNITE-4643
> URL: https://issues.apache.org/jira/browse/IGNITE-4643
> Project: Ignite
>  Issue Type: Bug
>  Components: jdbc
>Affects Versions: 1.8
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
> Fix For: 2.2
>
>
> {{JdbcDatabaseMetadata.getIndexInfo()}} method does not update metadata 
> before creating result set. So if it's a first method invocation on this 
> instance of {{JdbcDatabaseMetadata}}, it fails with NPE. Need to create tests 
> and add {{updateMetaData()}} call in the beginning of the method.



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


[jira] [Commented] (IGNITE-4643) JdbcDatabaseMetadata.getIndexInfo() method not working

2017-08-23 Thread Taras Ledkov (JIRA)

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

Taras Ledkov commented on IGNITE-4643:
--

The latest minimal changes looks good. It's OK with me.

> JdbcDatabaseMetadata.getIndexInfo() method not working
> --
>
> Key: IGNITE-4643
> URL: https://issues.apache.org/jira/browse/IGNITE-4643
> Project: Ignite
>  Issue Type: Bug
>  Components: jdbc
>Affects Versions: 1.8
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
> Fix For: 2.2
>
>
> {{JdbcDatabaseMetadata.getIndexInfo()}} method does not update metadata 
> before creating result set. So if it's a first method invocation on this 
> instance of {{JdbcDatabaseMetadata}}, it fails with NPE. Need to create tests 
> and add {{updateMetaData()}} call in the beginning of the method.



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


[jira] [Commented] (IGNITE-4643) JdbcDatabaseMetadata.getIndexInfo() method not working

2017-08-21 Thread Ilya Kasnacheev (JIRA)

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

Ilya Kasnacheev commented on IGNITE-4643:
-

I have created IGNITE-4643 for the rest of work.

> JdbcDatabaseMetadata.getIndexInfo() method not working
> --
>
> Key: IGNITE-4643
> URL: https://issues.apache.org/jira/browse/IGNITE-4643
> Project: Ignite
>  Issue Type: Bug
>  Components: jdbc
>Affects Versions: 1.8
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
> Fix For: 2.2
>
>
> {{JdbcDatabaseMetadata.getIndexInfo()}} method does not update metadata 
> before creating result set. So if it's a first method invocation on this 
> instance of {{JdbcDatabaseMetadata}}, it fails with NPE. Need to create tests 
> and add {{updateMetaData()}} call in the beginning of the method.



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


[jira] [Commented] (IGNITE-4643) JdbcDatabaseMetadata.getIndexInfo() method not working

2017-08-21 Thread Ilya Kasnacheev (JIRA)

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

Ilya Kasnacheev commented on IGNITE-4643:
-

[~vozerov] OK, let's do the one-liner. I have updated 
https://github.com/apache/ignite/pull/2481, please review it.

> JdbcDatabaseMetadata.getIndexInfo() method not working
> --
>
> Key: IGNITE-4643
> URL: https://issues.apache.org/jira/browse/IGNITE-4643
> Project: Ignite
>  Issue Type: Bug
>  Components: jdbc
>Affects Versions: 1.8
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
> Fix For: 2.2
>
>
> {{JdbcDatabaseMetadata.getIndexInfo()}} method does not update metadata 
> before creating result set. So if it's a first method invocation on this 
> instance of {{JdbcDatabaseMetadata}}, it fails with NPE. Need to create tests 
> and add {{updateMetaData()}} call in the beginning of the method.



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


[jira] [Commented] (IGNITE-4643) JdbcDatabaseMetadata.getIndexInfo() method not working

2017-08-21 Thread Vladimir Ozerov (JIRA)

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

Vladimir Ozerov commented on IGNITE-4643:
-

[~ilyak], my comments:
1) Changes to {{getDatabase*Version}} looks invalid to me. This method should 
return version of the database, which could differ from version of the driver. 
All changes to {{version}} methods should be reverted and implemented in a 
separate ticket.
2) I do not understand why {{matches}} method does upper-case conversions. 
{{MYTABLE}} and {{MyTable}} are different objects, but both will fall into same 
patterns.
3) As Taras mentioned, catalog is currently handled incorrectly. 

Provided that we have a range of problems here, and most of them are fixed 
incorrectly, I propose to focus on actual goal of the ticket - fix 
{{getIndexedInfo}} - this is one-line fix. The rest problems should be fixed 
separately.

> JdbcDatabaseMetadata.getIndexInfo() method not working
> --
>
> Key: IGNITE-4643
> URL: https://issues.apache.org/jira/browse/IGNITE-4643
> Project: Ignite
>  Issue Type: Bug
>  Components: jdbc
>Affects Versions: 1.8
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
> Fix For: 2.2
>
>
> {{JdbcDatabaseMetadata.getIndexInfo()}} method does not update metadata 
> before creating result set. So if it's a first method invocation on this 
> instance of {{JdbcDatabaseMetadata}}, it fails with NPE. Need to create tests 
> and add {{updateMetaData()}} call in the beginning of the method.



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


[jira] [Commented] (IGNITE-4643) JdbcDatabaseMetadata.getIndexInfo() method not working

2017-08-21 Thread Vladimir Ozerov (JIRA)

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

Vladimir Ozerov commented on IGNITE-4643:
-

[~ilyak], have you confirmed that these changes do really break anything?

> JdbcDatabaseMetadata.getIndexInfo() method not working
> --
>
> Key: IGNITE-4643
> URL: https://issues.apache.org/jira/browse/IGNITE-4643
> Project: Ignite
>  Issue Type: Bug
>  Components: jdbc
>Affects Versions: 1.8
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
> Fix For: 2.2
>
>
> {{JdbcDatabaseMetadata.getIndexInfo()}} method does not update metadata 
> before creating result set. So if it's a first method invocation on this 
> instance of {{JdbcDatabaseMetadata}}, it fails with NPE. Need to create tests 
> and add {{updateMetaData()}} call in the beginning of the method.



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


[jira] [Commented] (IGNITE-4643) JdbcDatabaseMetadata.getIndexInfo() method not working

2017-08-18 Thread Ilya Kasnacheev (JIRA)

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

Ilya Kasnacheev commented on IGNITE-4643:
-

2.1. I'll take a look whether it's a safe thing to do.
2.3. Might cause existing clients to fail (a potentially breaking API change) - 
scared to do that one.
2.4. I think we can go without uppercasing results output, but removing 
case-insensitive matching arguments is again a breaking change that's I'm 
afraid to do.

> JdbcDatabaseMetadata.getIndexInfo() method not working
> --
>
> Key: IGNITE-4643
> URL: https://issues.apache.org/jira/browse/IGNITE-4643
> Project: Ignite
>  Issue Type: Bug
>  Components: jdbc
>Affects Versions: 1.8
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
> Fix For: 2.2
>
>
> {{JdbcDatabaseMetadata.getIndexInfo()}} method does not update metadata 
> before creating result set. So if it's a first method invocation on this 
> instance of {{JdbcDatabaseMetadata}}, it fails with NPE. Need to create tests 
> and add {{updateMetaData()}} call in the beginning of the method.



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


[jira] [Commented] (IGNITE-4643) JdbcDatabaseMetadata.getIndexInfo() method not working

2017-08-18 Thread Taras Ledkov (JIRA)

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

Taras Ledkov commented on IGNITE-4643:
--

[~ilyak], looks good. My comments:
1. Code style: if / for braces for multi-line statements.
2. I think we have to create separate ticket to enhance DatabaseMetadata for 
jdbc2 (or fix the comments below in this ticket):
2.1. Works with schema name is invalid. {{cacheName != schemaName}}. see 
{{JdbcRequestHandler#getSchemas}}
2.3. {{calatog}} parameter is ignored in all method. An empty results must be 
returned when non=empty catalog argument is passed.
2.4. Uppercase mustn't use on match & results output.

> JdbcDatabaseMetadata.getIndexInfo() method not working
> --
>
> Key: IGNITE-4643
> URL: https://issues.apache.org/jira/browse/IGNITE-4643
> Project: Ignite
>  Issue Type: Bug
>  Components: jdbc
>Affects Versions: 1.8
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
> Fix For: 2.2
>
>
> {{JdbcDatabaseMetadata.getIndexInfo()}} method does not update metadata 
> before creating result set. So if it's a first method invocation on this 
> instance of {{JdbcDatabaseMetadata}}, it fails with NPE. Need to create tests 
> and add {{updateMetaData()}} call in the beginning of the method.



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


[jira] [Commented] (IGNITE-4643) JdbcDatabaseMetadata.getIndexInfo() method not working

2017-08-18 Thread Ilya Kasnacheev (JIRA)

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

Ilya Kasnacheev commented on IGNITE-4643:
-

https://reviews.ignite.apache.org/ignite/branch/PR%202481

Also ported several tests from Thin driver implementation.
Fixed a problem in Primary Keys metadata.
Fixed several get*Version() methods to return Ignite version/JDBC 4.1 
instead of dummy values.


> JdbcDatabaseMetadata.getIndexInfo() method not working
> --
>
> Key: IGNITE-4643
> URL: https://issues.apache.org/jira/browse/IGNITE-4643
> Project: Ignite
>  Issue Type: Bug
>  Components: jdbc
>Affects Versions: 1.8
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
> Fix For: 2.2
>
>
> {{JdbcDatabaseMetadata.getIndexInfo()}} method does not update metadata 
> before creating result set. So if it's a first method invocation on this 
> instance of {{JdbcDatabaseMetadata}}, it fails with NPE. Need to create tests 
> and add {{updateMetaData()}} call in the beginning of the method.



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


[jira] [Commented] (IGNITE-4643) JdbcDatabaseMetadata.getIndexInfo() method not working

2017-08-18 Thread ASF GitHub Bot (JIRA)

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

ASF GitHub Bot commented on IGNITE-4643:


GitHub user alamar opened a pull request:

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

IGNITE-4643 Fix NPE in getIndexInfo() with test

Also ported several tests from Thin driver implementation.
Fixed a problem in Primary Keys metadata.
Fixed several get*Version() methods to return Ignite version/JDBC 4.1 
instead of dummy values.

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

$ git pull https://github.com/alamar/ignite ignite-4643

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

https://github.com/apache/ignite/pull/2481.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 #2481


commit f3bf90943ce9a613296929d8050c55aa0cdc88b0
Author: Ilya Kasnacheev 
Date:   2017-08-18T11:40:42Z

IGNITE-4643 Fix NPE in getIndexInfo() with test

Also ported several tests from Thin driver implementation.
Fixed a problem in Primary Keys metadata.
Fixed several get*Version() methods to return Ignite version/JDBC 4.1 
instead of dummy values.




> JdbcDatabaseMetadata.getIndexInfo() method not working
> --
>
> Key: IGNITE-4643
> URL: https://issues.apache.org/jira/browse/IGNITE-4643
> Project: Ignite
>  Issue Type: Bug
>  Components: jdbc
>Affects Versions: 1.8
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
> Fix For: 2.2
>
>
> {{JdbcDatabaseMetadata.getIndexInfo()}} method does not update metadata 
> before creating result set. So if it's a first method invocation on this 
> instance of {{JdbcDatabaseMetadata}}, it fails with NPE. Need to create tests 
> and add {{updateMetaData()}} call in the beginning of the method.



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


[jira] [Commented] (IGNITE-4643) JdbcDatabaseMetadata.getIndexInfo() method not working

2017-08-18 Thread Ilya Kasnacheev (JIRA)

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

Ilya Kasnacheev commented on IGNITE-4643:
-

It seems that JdbcDatabaseMetadata is also lacking a lot of diagnostic calls 
which return sensible values in e.g. thin client.

> JdbcDatabaseMetadata.getIndexInfo() method not working
> --
>
> Key: IGNITE-4643
> URL: https://issues.apache.org/jira/browse/IGNITE-4643
> Project: Ignite
>  Issue Type: Bug
>  Components: jdbc
>Affects Versions: 1.8
>Reporter: Valentin Kulichenko
>Assignee: Ilya Kasnacheev
> Fix For: 2.2
>
>
> {{JdbcDatabaseMetadata.getIndexInfo()}} method does not update metadata 
> before creating result set. So if it's a first method invocation on this 
> instance of {{JdbcDatabaseMetadata}}, it fails with NPE. Need to create tests 
> and add {{updateMetaData()}} call in the beginning of the method.



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