[ https://issues.apache.org/jira/browse/HIVE-5545?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13795206#comment-13795206 ]
Thejas M Nair edited comment on HIVE-5545 at 9/8/14 5:54 PM: ------------------------------------------------------------- I am posting here my Hive table data and MapReduce code alongwith Error thrown: {noformat} cat test_data 2013,1,1 2013,1,3 2013,2,18 2013,2,20 2013,3,30 2013,3,31 create schema test; use test; ### This is temporary table create table unpar ( year INT, month INT, day INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; LOAD DATA LOCAL INPATH "test_data" OVERWRITE INTO TABLE test.unpar; ### This is input table and I will try to read "year" column using HCatalog. create table par (day INT) PARTITIONED BY (year INT, month INT ) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; INSERT OVERWRITE TABLE par PARTITION(Year, Month) SELECT day, year, month from unpar; ### this is output table create table out (year INT, cnt INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; {noformat} was (Author: rishav_rohit): I am posting here my Hive table data and MapReduce code alongwith Error thrown: cat test_data 2013,1,1 2013,1,3 2013,2,18 2013,2,20 2013,3,30 2013,3,31 create schema test; use test; ### This is temporary table create table unpar ( year INT, month INT, day INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; LOAD DATA LOCAL INPATH "test_data" OVERWRITE INTO TABLE test.unpar; ### This is input table and I will try to read "year" column using HCatalog. create table par (day INT) PARTITIONED BY (year INT, month INT ) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; INSERT OVERWRITE TABLE par PARTITION(Year, Month) SELECT day, year, month from unpar; ### this is output table create table out (year INT, cnt INT) ROW FORMAT DELIMITED FIELDS TERMINATED BY ',' STORED AS TEXTFILE; > HCatRecord getInteger method returns String when used on Partition columns of > type INT > -------------------------------------------------------------------------------------- > > Key: HIVE-5545 > URL: https://issues.apache.org/jira/browse/HIVE-5545 > Project: Hive > Issue Type: Bug > Components: HCatalog > Affects Versions: 0.11.0 > Environment: hadoop-1.0.3 > Reporter: Rishav Rohit > > HCatRecord getInteger method returns String when used on Partition columns of > type INT. > java.lang.ClassCastException: java.lang.String cannot be cast to > java.lang.Integer -- This message was sent by Atlassian JIRA (v6.3.4#6332)