You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hive.apache.org by "Panagiotis Garefalakis (Jira)" <ji...@apache.org> on 2019/10/28 10:28:00 UTC

[jira] [Assigned] (HIVE-13356) ClassCastException: org.apache.hadoop.hive.serde2.io.DateWritable cannot be cast to org.apache.hadoop.io.IntWritable

     [ https://issues.apache.org/jira/browse/HIVE-13356?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Panagiotis Garefalakis reassigned HIVE-13356:
---------------------------------------------

    Assignee: Panagiotis Garefalakis

> ClassCastException: org.apache.hadoop.hive.serde2.io.DateWritable cannot be cast to org.apache.hadoop.io.IntWritable
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: HIVE-13356
>                 URL: https://issues.apache.org/jira/browse/HIVE-13356
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.2.1
>            Reporter: Vitalii Diravka
>            Assignee: Panagiotis Garefalakis
>            Priority: Major
>         Attachments: fewtypes.parquet
>
>
> Hive query involves cast date to int data type throughs cast exception.
> {code}
> [mapr@cs2none500 bin]$ rpm -qa |grep mapr
> mapr-hadoop-core-2.7.0.32987.GA-1.x86_64
> mapr-fileserver-5.0.0.32987.GA-1.x86_64
> mapr-zookeeper-5.0.0.32987.GA-1.x86_64
> mapr-historyserver-2.7.0.32987.GA-1.x86_64
> mapr-hiveserver2-1.2.201601281422-1.noarch
> mapr-hive-1.2.201601281422-1.noarch
> mapr-hivemetastore-1.2.201601281422-1.noarch
> mapr-core-internal-5.0.0.32987.GA-1.x86_64
> mapr-mapreduce2-2.7.0.32987.GA-1.x86_64
> mapr-core-5.0.0.32987.GA-1.x86_64
> mapr-tasktracker-5.0.0.32987.GA-1.x86_64
> mapr-jobtracker-5.0.0.32987.GA-1.x86_64
> mapr-webserver-5.0.0.32987.GA-1.x86_64
> mapr-nodemanager-2.7.0.32987.GA-1.x86_64
> mapr-zk-internal-5.0.0.32987.GA.v3.4.5-1.x86_64
> mapr-mapreduce1-0.20.2.32987.GA-1.x86_64
> mapr-cldb-5.0.0.32987.GA-1.x86_64
> mapr-resourcemanager-2.7.0.32987.GA-1.x86_64
> mapr-drill-1.4.0.201601071151-1.noarch
> {code}
> Hive schema (parquet file in attachments):
> {code}
> create external table if not exists hive_storage.fewtypes_parquet (
>   int_col int,
>   bigint_col bigint,
>   date_col int,
>   time_col int,
>   timestamp_col bigint,
>   interval_col string,
>   varchar_col string,
>   float_col float,
>   double_col double,
>   bool_col boolean
> )
> STORED AS PARQUET
> LOCATION '/tmp/testdata/hive_storage/fewtypes_parquet';
> {code}
> {code}
> hive> use hive_storage;
> OK
> Time taken: 0.035 seconds
> hive> show tables;
> OK
> fewtypes_parquet
> Time taken: 0.034 seconds, Fetched: 1 row(s)
> hive> select * from fewtypes_parquet;
> OK
> SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
> SLF4J: Defaulting to no-operation (NOP) logger implementation
> SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
> Failed with exception java.io.IOException:org.apache.hadoop.hive.ql.metadata.HiveException: java.lang.ClassCastException: org.apache.hadoop.hive.serde2.io.DateWritable cannot be cast to org.apache.hadoop.io.IntWritable
> Time taken: 0.41 seconds
> {code}
> If date_col in CTAS is date the query will be executed. 
> Hive1.0 hasn't this issue.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)