[ https://issues.apache.org/jira/browse/HIVE-22431?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Syed Shameerur Rahman updated HIVE-22431: ----------------------------------------- Component/s: StorageHandler > Hive JDBC Storage Handler: java.lang.ClassCastException on accessing TINYINT, > SMALLINT Data Type From JDBC Data Source > ---------------------------------------------------------------------------------------------------------------------- > > Key: HIVE-22431 > URL: https://issues.apache.org/jira/browse/HIVE-22431 > Project: Hive > Issue Type: Bug > Components: StorageHandler > Reporter: Syed Shameerur Rahman > Assignee: Syed Shameerur Rahman > Priority: Major > > Steps to Reproduce: > {code:java} > //MySQL table: > create table testtbl(a TINYINT, b SMALLINT); > // Insert to table > //Hive table: > CREATE EXTERNAL TABLE `hive_table`( > a TINYINT, b SMALLINT > ) > ROW FORMAT SERDE > 'org.apache.hive.storage.jdbc.JdbcSerDe' > STORED BY > 'org.apache.hive.storage.jdbc.JdbcStorageHandler' > TBLPROPERTIES ( > > 'hive.sql.database.type'='MYSQL', > 'hive.sql.dbcp.password'='hive', > 'hive.sql.dbcp.username'='hive', > 'hive.sql.jdbc.driver'='com.mysql.jdbc.Driver', > 'hive.sql.jdbc.url'='jdbc:mysql://hadoop/test', > 'hive.sql.table'='testtbl'); > //Hive query: > select * from hive_table; > {code} > *Failed with exception > java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: > java.lang.ClassCastException: java.lang.Integer cannot be cast to > java.lang.Byte* > *Failed with exception > java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: > java.lang.ClassCastException: java.lang.Integer cannot be cast to > java.lang.Short* > {code:java} > {code} -- This message was sent by Atlassian Jira (v8.3.4#803005)