[ https://issues.apache.org/jira/browse/IGNITE-19976?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Evgeny Stanilovsky updated IGNITE-19976: ---------------------------------------- Ignite Flags: (was: Docs Required,Release Notes Required) > Sql: ClassCastException when trying to select from indexed smallint column > -------------------------------------------------------------------------- > > Key: IGNITE-19976 > URL: https://issues.apache.org/jira/browse/IGNITE-19976 > Project: Ignite > Issue Type: Bug > Components: sql > Affects Versions: 3.0.0-beta1, 3.0.0-beta2 > Reporter: Andrey Khitrin > Assignee: Maksim Zhuravkov > Priority: Major > Labels: ignite-3, sql > Fix For: 3.0.0-beta2 > > Time Spent: 1h > Remaining Estimate: 0h > > Steps to reproduce: > {code:sql} > sql-cli> create table tt(id INTEGER not null, field_1 TINYINT, field_2 > SMALLINT, primary key (id)); > Updated 0 rows. > sql-cli> SELECT * FROM tt WHERE field_2 = 50; > ╔════╤═════════╤═════════╗ > ║ ID │ FIELD_1 │ FIELD_2 ║ > ╠════╧═════════╧═════════╣ > ║ (empty) ║ > ╚════════════════════════╝ > -- select over field_2 works fine until we create an index on it! > sql-cli> CREATE INDEX tt_idx ON tt (field_2); > Updated 0 rows. > sql-cli> SELECT * FROM tt WHERE field_2 = 50; > SQL query execution error > Exception while executing query [query=SELECT * FROM tt WHERE field_2 = 50;]. > Error message:Query remote fragment execution failed: nodeName=defaultNode, > queryId=15a68600-41bc-46c5-b20d-7a96aad15477, fragmentId=4, > originalMessage=class java.lang.Integer cannot be cast to class > java.lang.Short (java.lang.Integer and java.lang.Short are in module > java.base of loader 'bootstrap') > {code} > This doesn't look good. A created index must not cause casting exception. > Reproduced on commit `fef7a24c2a029cac720d2fea3815c2a70a86b72f` (2023-07-12) -- This message was sent by Atlassian Jira (v8.20.10#820010)