[jira] [Commented] (IGNITE-13200) SQL create index on invalid data type

2020-10-07 Thread Taras Ledkov (Jira)


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

Taras Ledkov commented on IGNITE-13200:
---

[~nizhikov], merged to 
[ignite-2.9|https://github.com/apache/ignite/commit/e5108f0cf4a0d9345b49bb9d32522d77ceddfce2]

> SQL create index on invalid data type
> -
>
> Key: IGNITE-13200
> URL: https://issues.apache.org/jira/browse/IGNITE-13200
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Affects Versions: 2.8.1
>Reporter: Taras Ledkov
>Assignee: Taras Ledkov
>Priority: Major
> Fix For: 2.9
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> *Reproduce*
> - Create cache with value class
> {code}
> private static class Value {
> @QuerySqlField
> int val_int;
> java.util.Date val_date;
> }
> {code}
> - alter table with command
> {{ALTER TABLE TEST ADD COLUMN (VAL_DATE DATE)}}
> - try to create index with command
> {{CREATE INDEX TEST_VAL_DATE_IDX ON TEST(VAL_DATE)}}
> {{CorruptedTreeException}} is thrown, the node is stopped.
> {code}
> class org.apache.ignite.IgniteCheckedException: Runtime failure on row: 
> Row@6a2853cd[ key: 0, val: 
> org.apache.ignite.internal.processors.query.CreateIndexOnInvalidDataTypeTest$Value
>  [idHash=1693430008, hash=1583713321, val_int=0, val_date=Thu Jan 01 03:00:00 
> MSK 1970] ][ 0,  java.util.Date cannot be cast to java.sql.Date> ]
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.doPut(BPlusTree.java:2438)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.putx(BPlusTree.java:2388)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.putx(H2TreeIndex.java:434)
>   at 
> org.apache.ignite.internal.processors.query.h2.IndexBuildClosure.apply(IndexBuildClosure.java:52)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker$SchemaIndexCacheVisitorClosureWrapper.apply(SchemaIndexCachePartitionWorker.java:298)
>   at 
> org.apache.ignite.internal.processors.cache.GridCacheMapEntry.updateIndex(GridCacheMapEntry.java:4494)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.processKey(SchemaIndexCachePartitionWorker.java:231)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.processPartition(SchemaIndexCachePartitionWorker.java:188)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.body(SchemaIndexCachePartitionWorker.java:127)
>   at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: class 
> org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to 
> wrap object into H2 Value. java.util.Date cannot be cast to java.sql.Date
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.wrap(H2CacheRow.java:177)
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.getValue0(H2CacheRow.java:109)
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.getValue(H2CacheRow.java:91)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.io.AbstractH2ExtrasLeafIO.storeByOffset(AbstractH2ExtrasLeafIO.java:115)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.io.AbstractH2ExtrasLeafIO.storeByOffset(AbstractH2ExtrasLeafIO.java:37)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO.store(BPlusIO.java:185)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO.insert(BPlusIO.java:272)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.insertSimple(BPlusTree.java:3685)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.insert(BPlusTree.java:3667)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.access$1900(BPlusTree.java:3539)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Insert.run0(BPlusTree.java:452)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Insert.run0(BPlusTree.java:433)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5889)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5875)
>   at 
> 

[jira] [Commented] (IGNITE-13200) SQL create index on invalid data type

2020-10-07 Thread Ignite TC Bot (Jira)


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

Ignite TC Bot commented on IGNITE-13200:


{panel:title=Branch: [pull/8315/head] Base: [ignite-2.9] : Possible Blockers 
(3)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}Control Utility{color} [[tests 0 Exit Code 
|https://ci.ignite.apache.org/viewLog.html?buildId=5646345]]

{color:#d04437}Control Utility (Zookeeper){color} [[tests 0 Exit Code 
|https://ci.ignite.apache.org/viewLog.html?buildId=5646310]]

{color:#d04437}Platform C++ CMake (Win x64 / Release){color} [[tests 0 Exit 
Code |https://ci.ignite.apache.org/viewLog.html?buildId=5646316]]

{panel}
{panel:title=Branch: [pull/8315/head] Base: [ignite-2.9] : New Tests 
(10)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#8b}Queries 2{color} [[tests 
2|https://ci.ignite.apache.org/viewLog.html?buildId=5642673]]
* {color:#013220}IgniteBinaryCacheQueryTestSuite2: 
CreateIndexOnInvalidDataTypeTest.testAddInvalidDataToIndex - PASSED{color}
* {color:#013220}IgniteBinaryCacheQueryTestSuite2: 
CreateIndexOnInvalidDataTypeTest.testCreateIndexOnInvalidData - PASSED{color}

{color:#8b}Service Grid{color} [[tests 
4|https://ci.ignite.apache.org/viewLog.html?buildId=5642742]]
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.requestId[Test event=IgniteBiTuple 
[val1=DiscoveryEvent [evtNode=faaf575a-9a97-43f1-a7aa-3edc9f4f1739, topVer=0, 
msgTemplate=null, span=null, nodeId8=e593102c, msg=, type=NODE_JOINED, 
tstamp=1601899256863], val2=AffinityTopologyVersion 
[topVer=5317895024514164338, minorTopVer=0]]] - PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.topologyVersion[Test event=IgniteBiTuple 
[val1=DiscoveryEvent [evtNode=faaf575a-9a97-43f1-a7aa-3edc9f4f1739, topVer=0, 
msgTemplate=null, span=null, nodeId8=e593102c, msg=, type=NODE_JOINED, 
tstamp=1601899256863], val2=AffinityTopologyVersion 
[topVer=5317895024514164338, minorTopVer=0]]] - PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.requestId[Test event=IgniteBiTuple 
[val1=DiscoveryCustomEvent [customMsg=ServiceChangeBatchRequest 
[id=02d58a8f471-c94b7d00-1884-4d61-970e-5ba0d31a453d, reqs=SingletonList 
[ServiceUndeploymentRequest []]], affTopVer=null, super=DiscoveryEvent 
[evtNode=011a233e-2e6c-43fc-942a-0604d6c8e8ee, topVer=0, msgTemplate=null, 
span=null, nodeId8=011a233e, msg=null, type=DISCOVERY_CUSTOM_EVT, 
tstamp=1601899256863]], val2=AffinityTopologyVersion 
[topVer=-9104852701961610365, minorTopVer=0]]] - PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.topologyVersion[Test event=IgniteBiTuple 
[val1=DiscoveryCustomEvent [customMsg=ServiceChangeBatchRequest 
[id=02d58a8f471-c94b7d00-1884-4d61-970e-5ba0d31a453d, reqs=SingletonList 
[ServiceUndeploymentRequest []]], affTopVer=null, super=DiscoveryEvent 
[evtNode=011a233e-2e6c-43fc-942a-0604d6c8e8ee, topVer=0, msgTemplate=null, 
span=null, nodeId8=011a233e, msg=null, type=DISCOVERY_CUSTOM_EVT, 
tstamp=1601899256863]], val2=AffinityTopologyVersion 
[topVer=-9104852701961610365, minorTopVer=0]]] - PASSED{color}

{color:#8b}Service Grid (legacy mode){color} [[tests 
4|https://ci.ignite.apache.org/viewLog.html?buildId=5646475]]
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.requestId[Test event=IgniteBiTuple 
[val1=DiscoveryCustomEvent [customMsg=ServiceChangeBatchRequest 
[id=9359e330571-7d45631d-4c87-48ac-8148-3d2b52b4, reqs=SingletonList 
[ServiceUndeploymentRequest []]], affTopVer=null, super=DiscoveryEvent 
[evtNode=28ddb461-0ce3-4441-bce6-8973fb0246cb, topVer=0, msgTemplate=null, 
span=null, nodeId8=28ddb461, msg=null, type=DISCOVERY_CUSTOM_EVT, 
tstamp=1602076616572]], val2=AffinityTopologyVersion 
[topVer=-6133512399481371737, minorTopVer=0]]] - PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.topologyVersion[Test event=IgniteBiTuple 
[val1=DiscoveryCustomEvent [customMsg=ServiceChangeBatchRequest 
[id=9359e330571-7d45631d-4c87-48ac-8148-3d2b52b4, reqs=SingletonList 
[ServiceUndeploymentRequest []]], affTopVer=null, super=DiscoveryEvent 
[evtNode=28ddb461-0ce3-4441-bce6-8973fb0246cb, topVer=0, msgTemplate=null, 
span=null, nodeId8=28ddb461, msg=null, type=DISCOVERY_CUSTOM_EVT, 
tstamp=1602076616572]], val2=AffinityTopologyVersion 
[topVer=-6133512399481371737, minorTopVer=0]]] - PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.requestId[Test event=IgniteBiTuple 
[val1=DiscoveryEvent [evtNode=7b4d70e0-7bff-4367-bc02-f26ed1e538c1, topVer=0, 
msgTemplate=null, span=null, nodeId8=c8feb089, msg=, type=NODE_JOINED, 
tstamp=1602076616572], val2=AffinityTopologyVersion 
[topVer=472169475018167, 

[jira] [Commented] (IGNITE-13200) SQL create index on invalid data type

2020-10-05 Thread Taras Ledkov (Jira)


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

Taras Ledkov commented on IGNITE-13200:
---

[~nizhikov], sure I don't see the patch at the branch 'ignite-2.9'
I create [PR for ignite-2.9|https://github.com/apache/ignite/pull/8315].

And run TC. Lets wait TC visa and merge.

> SQL create index on invalid data type
> -
>
> Key: IGNITE-13200
> URL: https://issues.apache.org/jira/browse/IGNITE-13200
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Affects Versions: 2.8.1
>Reporter: Taras Ledkov
>Assignee: Taras Ledkov
>Priority: Major
> Fix For: 2.9
>
>  Time Spent: 40m
>  Remaining Estimate: 0h
>
> *Reproduce*
> - Create cache with value class
> {code}
> private static class Value {
> @QuerySqlField
> int val_int;
> java.util.Date val_date;
> }
> {code}
> - alter table with command
> {{ALTER TABLE TEST ADD COLUMN (VAL_DATE DATE)}}
> - try to create index with command
> {{CREATE INDEX TEST_VAL_DATE_IDX ON TEST(VAL_DATE)}}
> {{CorruptedTreeException}} is thrown, the node is stopped.
> {code}
> class org.apache.ignite.IgniteCheckedException: Runtime failure on row: 
> Row@6a2853cd[ key: 0, val: 
> org.apache.ignite.internal.processors.query.CreateIndexOnInvalidDataTypeTest$Value
>  [idHash=1693430008, hash=1583713321, val_int=0, val_date=Thu Jan 01 03:00:00 
> MSK 1970] ][ 0,  java.util.Date cannot be cast to java.sql.Date> ]
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.doPut(BPlusTree.java:2438)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.putx(BPlusTree.java:2388)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.putx(H2TreeIndex.java:434)
>   at 
> org.apache.ignite.internal.processors.query.h2.IndexBuildClosure.apply(IndexBuildClosure.java:52)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker$SchemaIndexCacheVisitorClosureWrapper.apply(SchemaIndexCachePartitionWorker.java:298)
>   at 
> org.apache.ignite.internal.processors.cache.GridCacheMapEntry.updateIndex(GridCacheMapEntry.java:4494)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.processKey(SchemaIndexCachePartitionWorker.java:231)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.processPartition(SchemaIndexCachePartitionWorker.java:188)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.body(SchemaIndexCachePartitionWorker.java:127)
>   at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: class 
> org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to 
> wrap object into H2 Value. java.util.Date cannot be cast to java.sql.Date
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.wrap(H2CacheRow.java:177)
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.getValue0(H2CacheRow.java:109)
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.getValue(H2CacheRow.java:91)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.io.AbstractH2ExtrasLeafIO.storeByOffset(AbstractH2ExtrasLeafIO.java:115)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.io.AbstractH2ExtrasLeafIO.storeByOffset(AbstractH2ExtrasLeafIO.java:37)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO.store(BPlusIO.java:185)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO.insert(BPlusIO.java:272)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.insertSimple(BPlusTree.java:3685)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.insert(BPlusTree.java:3667)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.access$1900(BPlusTree.java:3539)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Insert.run0(BPlusTree.java:452)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Insert.run0(BPlusTree.java:433)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5889)
>   at 
> 

[jira] [Commented] (IGNITE-13200) SQL create index on invalid data type

2020-10-05 Thread Nikolay Izhikov (Jira)


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

Nikolay Izhikov commented on IGNITE-13200:
--

Hello, [~tledkov-gridgain], [~alex_pl]

Looks like we miss this fix in the 2.9 branch.
Can you, please, confirm it?
It a blocker for one of the Ignite users.
We should include this fix in 2.9

> SQL create index on invalid data type
> -
>
> Key: IGNITE-13200
> URL: https://issues.apache.org/jira/browse/IGNITE-13200
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Affects Versions: 2.8.1
>Reporter: Taras Ledkov
>Assignee: Taras Ledkov
>Priority: Major
> Fix For: 2.9
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> *Reproduce*
> - Create cache with value class
> {code}
> private static class Value {
> @QuerySqlField
> int val_int;
> java.util.Date val_date;
> }
> {code}
> - alter table with command
> {{ALTER TABLE TEST ADD COLUMN (VAL_DATE DATE)}}
> - try to create index with command
> {{CREATE INDEX TEST_VAL_DATE_IDX ON TEST(VAL_DATE)}}
> {{CorruptedTreeException}} is thrown, the node is stopped.
> {code}
> class org.apache.ignite.IgniteCheckedException: Runtime failure on row: 
> Row@6a2853cd[ key: 0, val: 
> org.apache.ignite.internal.processors.query.CreateIndexOnInvalidDataTypeTest$Value
>  [idHash=1693430008, hash=1583713321, val_int=0, val_date=Thu Jan 01 03:00:00 
> MSK 1970] ][ 0,  java.util.Date cannot be cast to java.sql.Date> ]
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.doPut(BPlusTree.java:2438)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.putx(BPlusTree.java:2388)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.putx(H2TreeIndex.java:434)
>   at 
> org.apache.ignite.internal.processors.query.h2.IndexBuildClosure.apply(IndexBuildClosure.java:52)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker$SchemaIndexCacheVisitorClosureWrapper.apply(SchemaIndexCachePartitionWorker.java:298)
>   at 
> org.apache.ignite.internal.processors.cache.GridCacheMapEntry.updateIndex(GridCacheMapEntry.java:4494)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.processKey(SchemaIndexCachePartitionWorker.java:231)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.processPartition(SchemaIndexCachePartitionWorker.java:188)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.body(SchemaIndexCachePartitionWorker.java:127)
>   at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: class 
> org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to 
> wrap object into H2 Value. java.util.Date cannot be cast to java.sql.Date
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.wrap(H2CacheRow.java:177)
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.getValue0(H2CacheRow.java:109)
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.getValue(H2CacheRow.java:91)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.io.AbstractH2ExtrasLeafIO.storeByOffset(AbstractH2ExtrasLeafIO.java:115)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.io.AbstractH2ExtrasLeafIO.storeByOffset(AbstractH2ExtrasLeafIO.java:37)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO.store(BPlusIO.java:185)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO.insert(BPlusIO.java:272)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.insertSimple(BPlusTree.java:3685)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.insert(BPlusTree.java:3667)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.access$1900(BPlusTree.java:3539)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Insert.run0(BPlusTree.java:452)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Insert.run0(BPlusTree.java:433)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5889)
>   at 
> 

[jira] [Commented] (IGNITE-13200) SQL create index on invalid data type

2020-07-09 Thread Ignite TC Bot (Jira)


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

Ignite TC Bot commented on IGNITE-13200:


{panel:title=Branch: [pull/7982/head] Base: [master] : No blockers 
found!|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}{panel}
{panel:title=Branch: [pull/7982/head] Base: [master] : New Tests 
(10)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#8b}Queries 2{color} [tests 2]
* {color:#013220}IgniteBinaryCacheQueryTestSuite2: 
CreateIndexOnInvalidDataTypeTest.testAddInvalidDataToIndex - PASSED{color}
* {color:#013220}IgniteBinaryCacheQueryTestSuite2: 
CreateIndexOnInvalidDataTypeTest.testCreateIndexOnInvalidData - PASSED{color}

{color:#8b}Service Grid{color} [tests 4]
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.requestId[Test event=IgniteBiTuple 
[val1=DiscoveryCustomEvent [customMsg=ServiceChangeBatchRequest 
[id=f7062103371-ef2cb618-9528-48c3-a37a-b586dd5fbca1, reqs=SingletonList 
[ServiceUndeploymentRequest []]], affTopVer=null, super=DiscoveryEvent 
[evtNode=bbf45ef9-cd4a-4062-90e9-e21fd7415936, topVer=0, nodeId8=bbf45ef9, 
msg=null, type=DISCOVERY_CUSTOM_EVT, tstamp=1594239377531]], 
val2=AffinityTopologyVersion [topVer=6182766761648138206, minorTopVer=0]]] - 
PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.topologyVersion[Test event=IgniteBiTuple 
[val1=DiscoveryEvent [evtNode=263fcf3c-d142-4cd5-9dd9-21fcca4b4b97, topVer=0, 
nodeId8=63ced97e, msg=, type=NODE_JOINED, tstamp=1594239377531], 
val2=AffinityTopologyVersion [topVer=-6526311606659685217, minorTopVer=0]]] - 
PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.requestId[Test event=IgniteBiTuple 
[val1=DiscoveryEvent [evtNode=263fcf3c-d142-4cd5-9dd9-21fcca4b4b97, topVer=0, 
nodeId8=63ced97e, msg=, type=NODE_JOINED, tstamp=1594239377531], 
val2=AffinityTopologyVersion [topVer=-6526311606659685217, minorTopVer=0]]] - 
PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.topologyVersion[Test event=IgniteBiTuple 
[val1=DiscoveryCustomEvent [customMsg=ServiceChangeBatchRequest 
[id=f7062103371-ef2cb618-9528-48c3-a37a-b586dd5fbca1, reqs=SingletonList 
[ServiceUndeploymentRequest []]], affTopVer=null, super=DiscoveryEvent 
[evtNode=bbf45ef9-cd4a-4062-90e9-e21fd7415936, topVer=0, nodeId8=bbf45ef9, 
msg=null, type=DISCOVERY_CUSTOM_EVT, tstamp=1594239377531]], 
val2=AffinityTopologyVersion [topVer=6182766761648138206, minorTopVer=0]]] - 
PASSED{color}

{color:#8b}Service Grid (legacy mode){color} [tests 4]
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.topologyVersion[Test event=IgniteBiTuple 
[val1=DiscoveryEvent [evtNode=2ef6cfa3-7625-4a10-83fc-037d744132d6, topVer=0, 
nodeId8=8f617b93, msg=, type=NODE_JOINED, tstamp=1594239396148], 
val2=AffinityTopologyVersion [topVer=1404973700181321265, minorTopVer=0]]] - 
PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.requestId[Test event=IgniteBiTuple 
[val1=DiscoveryEvent [evtNode=2ef6cfa3-7625-4a10-83fc-037d744132d6, topVer=0, 
nodeId8=8f617b93, msg=, type=NODE_JOINED, tstamp=1594239396148], 
val2=AffinityTopologyVersion [topVer=1404973700181321265, minorTopVer=0]]] - 
PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.topologyVersion[Test event=IgniteBiTuple 
[val1=DiscoveryCustomEvent [customMsg=ServiceChangeBatchRequest 
[id=839a2103371-d6eb30ec-6f8f-46d6-9c74-959f7a8d8166, reqs=SingletonList 
[ServiceUndeploymentRequest []]], affTopVer=null, super=DiscoveryEvent 
[evtNode=c3ab5744-dd48-4f39-8000-21b536852594, topVer=0, nodeId8=c3ab5744, 
msg=null, type=DISCOVERY_CUSTOM_EVT, tstamp=1594239396148]], 
val2=AffinityTopologyVersion [topVer=7139965091300197822, minorTopVer=0]]] - 
PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.requestId[Test event=IgniteBiTuple 
[val1=DiscoveryCustomEvent [customMsg=ServiceChangeBatchRequest 
[id=839a2103371-d6eb30ec-6f8f-46d6-9c74-959f7a8d8166, reqs=SingletonList 
[ServiceUndeploymentRequest []]], affTopVer=null, super=DiscoveryEvent 
[evtNode=c3ab5744-dd48-4f39-8000-21b536852594, topVer=0, nodeId8=c3ab5744, 
msg=null, type=DISCOVERY_CUSTOM_EVT, tstamp=1594239396148]], 
val2=AffinityTopologyVersion [topVer=7139965091300197822, minorTopVer=0]]] - 
PASSED{color}

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

> SQL create index on invalid data type
> -
>
> Key: IGNITE-13200
> URL: https://issues.apache.org/jira/browse/IGNITE-13200
> Project: Ignite
>  Issue Type: Bug
>  

[jira] [Commented] (IGNITE-13200) SQL create index on invalid data type

2020-07-09 Thread Konstantin Orlov (Jira)


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

Konstantin Orlov commented on IGNITE-13200:
---

Hi [~tledkov-gridgain], I left few comments in Pr. Please take a look. Other is 
LGTM.

> SQL create index on invalid data type
> -
>
> Key: IGNITE-13200
> URL: https://issues.apache.org/jira/browse/IGNITE-13200
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Affects Versions: 2.8.1
>Reporter: Taras Ledkov
>Assignee: Taras Ledkov
>Priority: Major
> Fix For: 2.9
>
>  Time Spent: 20m
>  Remaining Estimate: 0h
>
> *Reproduce*
> - Create cache with value class
> {code}
> private static class Value {
> @QuerySqlField
> int val_int;
> java.util.Date val_date;
> }
> {code}
> - alter table with command
> {{ALTER TABLE TEST ADD COLUMN (VAL_DATE DATE)}}
> - try to create index with command
> {{CREATE INDEX TEST_VAL_DATE_IDX ON TEST(VAL_DATE)}}
> {{CorruptedTreeException}} is thrown, the node is stopped.
> {code}
> class org.apache.ignite.IgniteCheckedException: Runtime failure on row: 
> Row@6a2853cd[ key: 0, val: 
> org.apache.ignite.internal.processors.query.CreateIndexOnInvalidDataTypeTest$Value
>  [idHash=1693430008, hash=1583713321, val_int=0, val_date=Thu Jan 01 03:00:00 
> MSK 1970] ][ 0,  java.util.Date cannot be cast to java.sql.Date> ]
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.doPut(BPlusTree.java:2438)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.putx(BPlusTree.java:2388)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.putx(H2TreeIndex.java:434)
>   at 
> org.apache.ignite.internal.processors.query.h2.IndexBuildClosure.apply(IndexBuildClosure.java:52)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker$SchemaIndexCacheVisitorClosureWrapper.apply(SchemaIndexCachePartitionWorker.java:298)
>   at 
> org.apache.ignite.internal.processors.cache.GridCacheMapEntry.updateIndex(GridCacheMapEntry.java:4494)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.processKey(SchemaIndexCachePartitionWorker.java:231)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.processPartition(SchemaIndexCachePartitionWorker.java:188)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.body(SchemaIndexCachePartitionWorker.java:127)
>   at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: class 
> org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to 
> wrap object into H2 Value. java.util.Date cannot be cast to java.sql.Date
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.wrap(H2CacheRow.java:177)
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.getValue0(H2CacheRow.java:109)
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.getValue(H2CacheRow.java:91)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.io.AbstractH2ExtrasLeafIO.storeByOffset(AbstractH2ExtrasLeafIO.java:115)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.io.AbstractH2ExtrasLeafIO.storeByOffset(AbstractH2ExtrasLeafIO.java:37)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO.store(BPlusIO.java:185)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO.insert(BPlusIO.java:272)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.insertSimple(BPlusTree.java:3685)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.insert(BPlusTree.java:3667)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.access$1900(BPlusTree.java:3539)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Insert.run0(BPlusTree.java:452)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Insert.run0(BPlusTree.java:433)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5889)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5875)
>   at 
> 

[jira] [Commented] (IGNITE-13200) SQL create index on invalid data type

2020-07-08 Thread Ivan Bessonov (Jira)


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

Ivan Bessonov commented on IGNITE-13200:


Hi [~tledkov-gridgain],

fix looks good, but one particular change in BPlusTree looks excessive, can you 
please look at it? I left a comment in PR, thank you!

> SQL create index on invalid data type
> -
>
> Key: IGNITE-13200
> URL: https://issues.apache.org/jira/browse/IGNITE-13200
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Affects Versions: 2.8.1
>Reporter: Taras Ledkov
>Assignee: Taras Ledkov
>Priority: Major
> Fix For: 2.9
>
>  Time Spent: 10m
>  Remaining Estimate: 0h
>
> *Reproduce*
> - Create cache with value class
> {code}
> private static class Value {
> @QuerySqlField
> int val_int;
> java.util.Date val_date;
> }
> {code}
> - alter table with command
> {{ALTER TABLE TEST ADD COLUMN (VAL_DATE DATE)}}
> - try to create index with command
> {{CREATE INDEX TEST_VAL_DATE_IDX ON TEST(VAL_DATE)}}
> {{CorruptedTreeException}} is thrown, the node is stopped.
> {code}
> class org.apache.ignite.IgniteCheckedException: Runtime failure on row: 
> Row@6a2853cd[ key: 0, val: 
> org.apache.ignite.internal.processors.query.CreateIndexOnInvalidDataTypeTest$Value
>  [idHash=1693430008, hash=1583713321, val_int=0, val_date=Thu Jan 01 03:00:00 
> MSK 1970] ][ 0,  java.util.Date cannot be cast to java.sql.Date> ]
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.doPut(BPlusTree.java:2438)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.putx(BPlusTree.java:2388)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.putx(H2TreeIndex.java:434)
>   at 
> org.apache.ignite.internal.processors.query.h2.IndexBuildClosure.apply(IndexBuildClosure.java:52)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker$SchemaIndexCacheVisitorClosureWrapper.apply(SchemaIndexCachePartitionWorker.java:298)
>   at 
> org.apache.ignite.internal.processors.cache.GridCacheMapEntry.updateIndex(GridCacheMapEntry.java:4494)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.processKey(SchemaIndexCachePartitionWorker.java:231)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.processPartition(SchemaIndexCachePartitionWorker.java:188)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.body(SchemaIndexCachePartitionWorker.java:127)
>   at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: class 
> org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to 
> wrap object into H2 Value. java.util.Date cannot be cast to java.sql.Date
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.wrap(H2CacheRow.java:177)
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.getValue0(H2CacheRow.java:109)
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.getValue(H2CacheRow.java:91)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.io.AbstractH2ExtrasLeafIO.storeByOffset(AbstractH2ExtrasLeafIO.java:115)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.io.AbstractH2ExtrasLeafIO.storeByOffset(AbstractH2ExtrasLeafIO.java:37)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO.store(BPlusIO.java:185)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO.insert(BPlusIO.java:272)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.insertSimple(BPlusTree.java:3685)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.insert(BPlusTree.java:3667)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.access$1900(BPlusTree.java:3539)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Insert.run0(BPlusTree.java:452)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Insert.run0(BPlusTree.java:433)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5889)
>   at 
> 

[jira] [Commented] (IGNITE-13200) SQL create index on invalid data type

2020-07-08 Thread Ignite TC Bot (Jira)


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

Ignite TC Bot commented on IGNITE-13200:


{panel:title=Branch: [pull/7982/head] Base: [master] : Possible Blockers 
(1)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#F7D6C1}
{color:#d04437}PDS (Indexing){color} [[tests 0 Exit Code 
|https://ci.ignite.apache.org/viewLog.html?buildId=5448357]]

{panel}
{panel:title=Branch: [pull/7982/head] Base: [master] : New Tests 
(10)|borderStyle=dashed|borderColor=#ccc|titleBGColor=#D6F7C1}
{color:#8b}Queries 2{color} [tests 2]
* {color:#013220}IgniteBinaryCacheQueryTestSuite2: 
CreateIndexOnInvalidDataTypeTest.testAddInvalidDataToIndex - PASSED{color}
* {color:#013220}IgniteBinaryCacheQueryTestSuite2: 
CreateIndexOnInvalidDataTypeTest.testCreateIndexOnInvalidData - PASSED{color}

{color:#8b}Service Grid{color} [tests 4]
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.topologyVersion[Test event=IgniteBiTuple 
[val1=DiscoveryCustomEvent [customMsg=ServiceChangeBatchRequest 
[id=987239a2371-79390b11-3632-4d85-9e95-a7e1376d8b8e, reqs=SingletonList 
[ServiceUndeploymentRequest []]], affTopVer=null, super=DiscoveryEvent 
[evtNode=a2d0036f-5db7-47db-b473-ca3e4ae0a2e6, topVer=0, nodeId8=a2d0036f, 
msg=null, type=DISCOVERY_CUSTOM_EVT, tstamp=1594147153797]], 
val2=AffinityTopologyVersion [topVer=7601406044098132898, minorTopVer=0]]] - 
PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.requestId[Test event=IgniteBiTuple 
[val1=DiscoveryCustomEvent [customMsg=ServiceChangeBatchRequest 
[id=987239a2371-79390b11-3632-4d85-9e95-a7e1376d8b8e, reqs=SingletonList 
[ServiceUndeploymentRequest []]], affTopVer=null, super=DiscoveryEvent 
[evtNode=a2d0036f-5db7-47db-b473-ca3e4ae0a2e6, topVer=0, nodeId8=a2d0036f, 
msg=null, type=DISCOVERY_CUSTOM_EVT, tstamp=1594147153797]], 
val2=AffinityTopologyVersion [topVer=7601406044098132898, minorTopVer=0]]] - 
PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.topologyVersion[Test event=IgniteBiTuple 
[val1=DiscoveryEvent [evtNode=4b15f9e7-19e4-4d4a-bb0f-1b2a62060f2b, topVer=0, 
nodeId8=a3f3937f, msg=, type=NODE_JOINED, tstamp=1594147153797], 
val2=AffinityTopologyVersion [topVer=-2262562060701615165, minorTopVer=0]]] - 
PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.requestId[Test event=IgniteBiTuple 
[val1=DiscoveryEvent [evtNode=4b15f9e7-19e4-4d4a-bb0f-1b2a62060f2b, topVer=0, 
nodeId8=a3f3937f, msg=, type=NODE_JOINED, tstamp=1594147153797], 
val2=AffinityTopologyVersion [topVer=-2262562060701615165, minorTopVer=0]]] - 
PASSED{color}

{color:#8b}Service Grid (legacy mode){color} [tests 4]
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.topologyVersion[Test event=IgniteBiTuple 
[val1=DiscoveryEvent [evtNode=7eb6990e-ed38-42dd-b1ae-f4cb8f33956e, topVer=0, 
nodeId8=7904b65e, msg=, type=NODE_JOINED, tstamp=1594127065232], 
val2=AffinityTopologyVersion [topVer=-590633232614788648, minorTopVer=0]]] - 
PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.requestId[Test event=IgniteBiTuple 
[val1=DiscoveryEvent [evtNode=7eb6990e-ed38-42dd-b1ae-f4cb8f33956e, topVer=0, 
nodeId8=7904b65e, msg=, type=NODE_JOINED, tstamp=1594127065232], 
val2=AffinityTopologyVersion [topVer=-590633232614788648, minorTopVer=0]]] - 
PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.topologyVersion[Test event=IgniteBiTuple 
[val1=DiscoveryCustomEvent [customMsg=ServiceChangeBatchRequest 
[id=1b48a692371-20368e63-1380-47f7-a15e-81c80f14d2d7, reqs=SingletonList 
[ServiceUndeploymentRequest []]], affTopVer=null, super=DiscoveryEvent 
[evtNode=6b04be02-f370-4c26-b3c0-934a046489b6, topVer=0, nodeId8=6b04be02, 
msg=null, type=DISCOVERY_CUSTOM_EVT, tstamp=1594127065232]], 
val2=AffinityTopologyVersion [topVer=8130921099951580873, minorTopVer=0]]] - 
PASSED{color}
* {color:#013220}IgniteServiceGridTestSuite: 
ServiceDeploymentProcessIdSelfTest.requestId[Test event=IgniteBiTuple 
[val1=DiscoveryCustomEvent [customMsg=ServiceChangeBatchRequest 
[id=1b48a692371-20368e63-1380-47f7-a15e-81c80f14d2d7, reqs=SingletonList 
[ServiceUndeploymentRequest []]], affTopVer=null, super=DiscoveryEvent 
[evtNode=6b04be02-f370-4c26-b3c0-934a046489b6, topVer=0, nodeId8=6b04be02, 
msg=null, type=DISCOVERY_CUSTOM_EVT, tstamp=1594127065232]], 
val2=AffinityTopologyVersion [topVer=8130921099951580873, minorTopVer=0]]] - 
PASSED{color}

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

> SQL create index on invalid data type
> -
>
> Key: IGNITE-13200
> URL: 

[jira] [Commented] (IGNITE-13200) SQL create index on invalid data type

2020-07-08 Thread Taras Ledkov (Jira)


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

Taras Ledkov commented on IGNITE-13200:
---

[~korlov], [~ibessonov], please review the patch.

> SQL create index on invalid data type
> -
>
> Key: IGNITE-13200
> URL: https://issues.apache.org/jira/browse/IGNITE-13200
> Project: Ignite
>  Issue Type: Bug
>  Components: sql
>Affects Versions: 2.8.1
>Reporter: Taras Ledkov
>Assignee: Taras Ledkov
>Priority: Major
> Fix For: 2.9
>
>
> *Reproduce*
> - Create cache with value class
> {code}
> private static class Value {
> @QuerySqlField
> int val_int;
> java.util.Date val_date;
> }
> {code}
> - alter table with command
> {{ALTER TABLE TEST ADD COLUMN (VAL_DATE DATE)}}
> - try to create index with command
> {{CREATE INDEX TEST_VAL_DATE_IDX ON TEST(VAL_DATE)}}
> {{CorruptedTreeException}} is thrown, the node is stopped.
> {code}
> class org.apache.ignite.IgniteCheckedException: Runtime failure on row: 
> Row@6a2853cd[ key: 0, val: 
> org.apache.ignite.internal.processors.query.CreateIndexOnInvalidDataTypeTest$Value
>  [idHash=1693430008, hash=1583713321, val_int=0, val_date=Thu Jan 01 03:00:00 
> MSK 1970] ][ 0,  java.util.Date cannot be cast to java.sql.Date> ]
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.doPut(BPlusTree.java:2438)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree.putx(BPlusTree.java:2388)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.H2TreeIndex.putx(H2TreeIndex.java:434)
>   at 
> org.apache.ignite.internal.processors.query.h2.IndexBuildClosure.apply(IndexBuildClosure.java:52)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker$SchemaIndexCacheVisitorClosureWrapper.apply(SchemaIndexCachePartitionWorker.java:298)
>   at 
> org.apache.ignite.internal.processors.cache.GridCacheMapEntry.updateIndex(GridCacheMapEntry.java:4494)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.processKey(SchemaIndexCachePartitionWorker.java:231)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.processPartition(SchemaIndexCachePartitionWorker.java:188)
>   at 
> org.apache.ignite.internal.processors.query.schema.SchemaIndexCachePartitionWorker.body(SchemaIndexCachePartitionWorker.java:127)
>   at 
> org.apache.ignite.internal.util.worker.GridWorker.run(GridWorker.java:120)
>   at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>   at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>   at java.lang.Thread.run(Thread.java:748)
> Caused by: class 
> org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to 
> wrap object into H2 Value. java.util.Date cannot be cast to java.sql.Date
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.wrap(H2CacheRow.java:177)
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.getValue0(H2CacheRow.java:109)
>   at 
> org.apache.ignite.internal.processors.query.h2.opt.H2CacheRow.getValue(H2CacheRow.java:91)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.io.AbstractH2ExtrasLeafIO.storeByOffset(AbstractH2ExtrasLeafIO.java:115)
>   at 
> org.apache.ignite.internal.processors.query.h2.database.io.AbstractH2ExtrasLeafIO.storeByOffset(AbstractH2ExtrasLeafIO.java:37)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO.store(BPlusIO.java:185)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.io.BPlusIO.insert(BPlusIO.java:272)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.insertSimple(BPlusTree.java:3685)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.insert(BPlusTree.java:3667)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Put.access$1900(BPlusTree.java:3539)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Insert.run0(BPlusTree.java:452)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$Insert.run0(BPlusTree.java:433)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5889)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.BPlusTree$GetPageHandler.run(BPlusTree.java:5875)
>   at 
> org.apache.ignite.internal.processors.cache.persistence.tree.util.PageHandler.writePage(PageHandler.java:360)
>   at