[jira] [Commented] (IGNITE-11368) use the same information about indexes for JDBC drivers as for system view INDEXES

2022-11-03 Thread Ilya Shishkov (Jira)


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

Ilya Shishkov commented on IGNITE-11368:


[~timonin.maksim], thanks a lot for the review!

> use the same information about indexes for JDBC drivers as for system view 
> INDEXES
> --
>
> Key: IGNITE-11368
> URL: https://issues.apache.org/jira/browse/IGNITE-11368
> Project: Ignite
>  Issue Type: Task
>  Components: jdbc, odbc, sql
>Reporter: Yury Gerzhedovich
>Assignee: Ilya Shishkov
>Priority: Major
>  Labels: ise, newbie
> Fix For: 2.15
>
> Attachments: indexes_sqlline.txt
>
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> As of now indexes information for JDBC drivers get by another way then system 
> SQL view INDEXES. Need to use single source of the information to have 
> consistent picture.
> So, JDBC drivers should use the same source as SQL view INDEXES 
> (org.apache.ignite.internal.processors.query.h2.sys.view.SqlSystemViewIndexes)
> Start point for JDBC index metadata is 
> org.apache.ignite.internal.jdbc2.JdbcDatabaseMetadata#getIndexInfo
> Also order of result should be correspond Javadoc ('ordered by NON_UNIQUE, 
> TYPE, INDEX_NAME, and ORDINAL_POSITION') - at present it is not so.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IGNITE-11368) use the same information about indexes for JDBC drivers as for system view INDEXES

2022-11-03 Thread Ignite TC Bot (Jira)


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

Ignite TC Bot commented on IGNITE-11368:


{panel:title=Branch: [pull/10316/head] Base: [master] : No blockers 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/10316/head] Base: [master] : New Tests 
(12)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#8b}JDBC Driver{color} [[tests 
1|https://ci2.ignite.apache.org/viewLog.html?buildId=6890773]]
* {color:#013220}IgniteJdbcDriverTestSuite: 
JdbcThinMetadataSelfTest.testIndexMetadataMatchesSystemView - PASSED{color}

{color:#8b}Calcite SQL{color} [[tests 
11|https://ci2.ignite.apache.org/viewLog.html?buildId=6890322]]
* {color:#013220}IgniteCalciteTestSuite: 
SearchSargOnIndexPlannerTest.testBoundsOneFieldSearchWithNull - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
SearchSargOnIndexPlannerTest.testBoundsWithCorrelate - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
SearchSargOnIndexPlannerTest.testBoundsOneFieldSearchRangeOptimization - 
PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
SearchSargOnIndexPlannerTest.testBoundsSeveralFieldsSearch - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
SearchSargOnIndexPlannerTest.testBoundsMaxComplexity - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
SearchSargOnIndexPlannerTest.testBoundsDynamicParams - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
SearchSargOnIndexPlannerTest.testBoundsOneFieldSearchDeduplication - 
PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
SearchSargOnIndexPlannerTest.testBoundsOneFieldSearch - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
SearchSargOnIndexPlannerTest.testBoundsDescOrdering - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
SearchSargOnIndexPlannerTest.testBoundsTypeConversion - PASSED{color}
* {color:#013220}IgniteCalciteTestSuite: 
SearchSargOnIndexPlannerTest.testBoundsOneFieldSingleTuple - PASSED{color}
... and 0 new tests

{panel}
[TeamCity *-- Run :: All* 
Results|https://ci2.ignite.apache.org/viewLog.html?buildId=6890402buildTypeId=IgniteTests24Java8_RunAll]

> use the same information about indexes for JDBC drivers as for system view 
> INDEXES
> --
>
> Key: IGNITE-11368
> URL: https://issues.apache.org/jira/browse/IGNITE-11368
> Project: Ignite
>  Issue Type: Task
>  Components: jdbc, odbc, sql
>Reporter: Yury Gerzhedovich
>Assignee: Ilya Shishkov
>Priority: Major
>  Labels: ise, newbie
> Fix For: 2.15
>
> Attachments: indexes_sqlline.txt
>
>  Time Spent: 2h 10m
>  Remaining Estimate: 0h
>
> As of now indexes information for JDBC drivers get by another way then system 
> SQL view INDEXES. Need to use single source of the information to have 
> consistent picture.
> So, JDBC drivers should use the same source as SQL view INDEXES 
> (org.apache.ignite.internal.processors.query.h2.sys.view.SqlSystemViewIndexes)
> Start point for JDBC index metadata is 
> org.apache.ignite.internal.jdbc2.JdbcDatabaseMetadata#getIndexInfo
> Also order of result should be correspond Javadoc ('ordered by NON_UNIQUE, 
> TYPE, INDEX_NAME, and ORDINAL_POSITION') - at present it is not so.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IGNITE-11368) use the same information about indexes for JDBC drivers as for system view INDEXES

2022-11-01 Thread Ignite TC Bot (Jira)


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

Ignite TC Bot commented on IGNITE-11368:


{panel:title=Branch: [pull/10316/head] Base: [master] : Possible Blockers 
(2)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}Cache 2{color} [[tests 1 TIMEOUT , Out Of Memory Error , Exit 
Code |https://ci.ignite.apache.org/viewLog.html?buildId=6882164]]
* IgniteCacheTestSuite2: 
IgniteCacheClientNodeChangingTopologyTest.testPessimisticTx - Test has low fail 
rate in base branch 0,0% and is not flaky

{panel}
{panel:title=Branch: [pull/10316/head] Base: [master] : No new tests 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}{panel}
[TeamCity *-- Run :: All* 
Results|https://ci.ignite.apache.org/viewLog.html?buildId=6881596buildTypeId=IgniteTests24Java8_RunAll]

> use the same information about indexes for JDBC drivers as for system view 
> INDEXES
> --
>
> Key: IGNITE-11368
> URL: https://issues.apache.org/jira/browse/IGNITE-11368
> Project: Ignite
>  Issue Type: Task
>  Components: jdbc, odbc, sql
>Reporter: Yury Gerzhedovich
>Assignee: Ilya Shishkov
>Priority: Major
>  Labels: ise, newbie
> Attachments: indexes_sqlline.txt
>
>  Time Spent: 2h
>  Remaining Estimate: 0h
>
> As of now indexes information for JDBC drivers get by another way then system 
> SQL view INDEXES. Need to use single source of the information to have 
> consistent picture.
> So, JDBC drivers should use the same source as SQL view INDEXES 
> (org.apache.ignite.internal.processors.query.h2.sys.view.SqlSystemViewIndexes)
> Start point for JDBC index metadata is 
> org.apache.ignite.internal.jdbc2.JdbcDatabaseMetadata#getIndexInfo
> Also order of result should be correspond Javadoc ('ordered by NON_UNIQUE, 
> TYPE, INDEX_NAME, and ORDINAL_POSITION') - at present it is not so.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IGNITE-11368) use the same information about indexes for JDBC drivers as for system view INDEXES

2022-10-17 Thread Ilya Shishkov (Jira)


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

Ilya Shishkov commented on IGNITE-11368:


[~timonin.maksim], [~jooger], can you take a look, please?

Above failure are unrelated to the fix.

> use the same information about indexes for JDBC drivers as for system view 
> INDEXES
> --
>
> Key: IGNITE-11368
> URL: https://issues.apache.org/jira/browse/IGNITE-11368
> Project: Ignite
>  Issue Type: Task
>  Components: jdbc, odbc, sql
>Reporter: Yury Gerzhedovich
>Assignee: Ilya Shishkov
>Priority: Major
>  Labels: ise, newbie
> Attachments: indexes_sqlline.txt
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> As of now indexes information for JDBC drivers get by another way then system 
> SQL view INDEXES. Need to use single source of the information to have 
> consistent picture.
> So, JDBC drivers should use the same source as SQL view INDEXES 
> (org.apache.ignite.internal.processors.query.h2.sys.view.SqlSystemViewIndexes)
> Start point for JDBC index metadata is 
> org.apache.ignite.internal.jdbc2.JdbcDatabaseMetadata#getIndexInfo
> Also order of result should be correspond Javadoc ('ordered by NON_UNIQUE, 
> TYPE, INDEX_NAME, and ORDINAL_POSITION') - at present it is not so.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IGNITE-11368) use the same information about indexes for JDBC drivers as for system view INDEXES

2022-10-17 Thread Ignite TC Bot (Jira)


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

Ignite TC Bot commented on IGNITE-11368:


{panel:title=Branch: [pull/10316/head] Base: [master] : Possible Blockers 
(2)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}Cache 2{color} [[tests 1 TIMEOUT , Out Of Memory Error 
|https://ci.ignite.apache.org/viewLog.html?buildId=6837422]]
* IgniteCacheTestSuite2: 
IgniteCacheClientNodeChangingTopologyTest.testPessimisticTx - Test has low fail 
rate in base branch 0,0% and is not flaky

{panel}
{panel:title=Branch: [pull/10316/head] Base: [master] : No new tests 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}{panel}
[TeamCity *-- Run :: All* 
Results|https://ci.ignite.apache.org/viewLog.html?buildId=6836092buildTypeId=IgniteTests24Java8_RunAll]

> use the same information about indexes for JDBC drivers as for system view 
> INDEXES
> --
>
> Key: IGNITE-11368
> URL: https://issues.apache.org/jira/browse/IGNITE-11368
> Project: Ignite
>  Issue Type: Task
>  Components: jdbc, odbc, sql
>Reporter: Yury Gerzhedovich
>Assignee: Ilya Shishkov
>Priority: Major
>  Labels: ise, newbie
> Attachments: indexes_sqlline.txt
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> As of now indexes information for JDBC drivers get by another way then system 
> SQL view INDEXES. Need to use single source of the information to have 
> consistent picture.
> So, JDBC drivers should use the same source as SQL view INDEXES 
> (org.apache.ignite.internal.processors.query.h2.sys.view.SqlSystemViewIndexes)
> Start point for JDBC index metadata is 
> org.apache.ignite.internal.jdbc2.JdbcDatabaseMetadata#getIndexInfo
> Also order of result should be correspond Javadoc ('ordered by NON_UNIQUE, 
> TYPE, INDEX_NAME, and ORDINAL_POSITION') - at present it is not so.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IGNITE-11368) use the same information about indexes for JDBC drivers as for system view INDEXES

2022-10-14 Thread Ilya Shishkov (Jira)


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

Ilya Shishkov commented on IGNITE-11368:


*UPDATE:*
Previous comment is not actual now:

_SCAN and _key_PK_hash are not present in system view.

Origin of system view metadata was changed after IGNITE-15424: 
{{TableDescriptor}} and {{IndexDescriptor}} are used.

> use the same information about indexes for JDBC drivers as for system view 
> INDEXES
> --
>
> Key: IGNITE-11368
> URL: https://issues.apache.org/jira/browse/IGNITE-11368
> Project: Ignite
>  Issue Type: Task
>  Components: jdbc, odbc, sql
>Reporter: Yury Gerzhedovich
>Assignee: Ilya Shishkov
>Priority: Major
>  Labels: ise, newbie
> Attachments: indexes_sqlline.txt
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> As of now indexes information for JDBC drivers get by another way then system 
> SQL view INDEXES. Need to use single source of the information to have 
> consistent picture.
> So, JDBC drivers should use the same source as SQL view INDEXES 
> (org.apache.ignite.internal.processors.query.h2.sys.view.SqlSystemViewIndexes)
> Start point for JDBC index metadata is 
> org.apache.ignite.internal.jdbc2.JdbcDatabaseMetadata#getIndexInfo
> Also order of result should be correspond Javadoc ('ordered by NON_UNIQUE, 
> TYPE, INDEX_NAME, and ORDINAL_POSITION') - at present it is not so.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)


[jira] [Commented] (IGNITE-11368) use the same information about indexes for JDBC drivers as for system view INDEXES

2022-06-24 Thread Ilya Shishkov (Jira)


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

Ilya Shishkov commented on IGNITE-11368:


Hi [~jooger]!

As I see, there are some significant changes, since this issue was created:
 # 
{{org.apache.ignite.internal.processors.query.h2.sys.view.SqlSystemViewIndexes}}
 had been replaced by 
{{{}org.apache.ignite.spi.systemview.view.SqlIndexView{}}}. Class is in 
{{ignite-indexing}} module and is inaccessible for {{JdbcIndexMeta}} and 
{{JdbcMetadataInfo}} from {{ignite-core}} module.
 # System View API had been released.
 # Calcite engine had been released.

So, in order to get information about indexes, I suggest to use System View API 
which is independent from query engine.

Also, I suggest to add {{TABLE_SCHEM}} and {{TABLE_NAME}} columns to sorting 
order, so full order will be as follows: {{TABLE_SCHEM}} -> {{TABLE_NAME}} -> 
{{NON_UNIQUE}} -> {{TYPE}} -> {{INDEX_NAME}} -> {{ORDINAL_POSITION}}.
It is necessary for correct sorting when arguments {{schemaNamePtrn}} or 
{{tblNamePtrn}} of {{JdbcMetadataInfo#getIndexesMeta}} fits to multiple tables. 
For example, when you call {{!indexes}} command in {{sqlline}} utility, the 
{{tblNamePtrn}} would be "%". Other fields will be sorted according to 
{{DatabaseMetaData#getIndexInfo}} JavaDoc.

Also, I have two questions:
* {{tableIndexOther}} is assigned to {{TYPE}} for all indexes in 
{{JdbcUtils#indexRows}}. Is it still actual type for indexes? Should not we set 
{{tableIndexHashed}} for {{"_key_PK_hash"}} indexes?
* {{"__SCAN_"}} indexes has no columns. Is it correct to return NULL values for 
{{ORDINAL_POSITION}} and {{COLUMN_NAME}} columns in metadata?

Examples of output of {{INDEXES}} system view and proposed output of metadata 
(performed in {{sqlline}}): [^indexes_sqlline.txt]

WDYT?

> use the same information about indexes for JDBC drivers as for system view 
> INDEXES
> --
>
> Key: IGNITE-11368
> URL: https://issues.apache.org/jira/browse/IGNITE-11368
> Project: Ignite
>  Issue Type: Task
>  Components: jdbc, odbc, sql
>Reporter: Yury Gerzhedovich
>Assignee: Ilya Shishkov
>Priority: Major
>  Labels: newbie
> Attachments: indexes_sqlline.txt
>
>
> As of now indexes information for JDBC drivers get by another way then system 
> SQL view INDEXES. Need to use single source of the information to have 
> consistent picture.
> So, JDBC drivers should use the same source as SQL view INDEXES 
> (org.apache.ignite.internal.processors.query.h2.sys.view.SqlSystemViewIndexes)
> Start point for JDBC index metadata is 
> org.apache.ignite.internal.jdbc2.JdbcDatabaseMetadata#getIndexInfo
> Also order of result should be correspond Javadoc ('ordered by NON_UNIQUE, 
> TYPE, INDEX_NAME, and ORDINAL_POSITION') - at present it is not so.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)