hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McLellan (JIRA)" <>
Subject [jira] [Created] (HIVE-8678) Pig fails to correctly load DATE fields using HCatalog
Date Thu, 30 Oct 2014 23:14:34 GMT
Michael McLellan created HIVE-8678:

             Summary: Pig fails to correctly load DATE fields using HCatalog
                 Key: HIVE-8678
             Project: Hive
          Issue Type: Bug
          Components: HCatalog
    Affects Versions: 0.13.1
            Reporter: Michael McLellan

Hadoop 2.5.0-cdh5.2.0 
Pig 0.12.0-cdh5.2.0
Hive 0.13.1-cdh5.2.0

When using pig -useHCatalog to load a Hive table that has a DATE field, when trying to DUMP
the field, the following error occurs:

2014-10-30 22:58:05,469 [main] ERROR org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.Launcher
- org.apache.pig.backend.executionengine.ExecException: ERROR 6018: Error converting read
value to tuple
        at org.apache.hive.hcatalog.pig.HCatBaseLoader.getNext(
        at org.apache.hive.hcatalog.pig.HCatLoader.getNext(
        at org.apache.pig.backend.hadoop.executionengine.mapReduceLayer.PigRecordReader.nextKeyValue(
        at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.nextKeyValue(
        at org.apache.hadoop.mapreduce.task.MapContextImpl.nextKeyValue(
        at org.apache.hadoop.mapred.MapTask.runNewMapper(
        at org.apache.hadoop.mapred.YarnChild$
        at Method)
        at org.apache.hadoop.mapred.YarnChild.main(
Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.sql.Date
        at org.apache.hive.hcatalog.pig.PigHCatUtil.extractPigObject(
        at org.apache.hive.hcatalog.pig.PigHCatUtil.transformToTuple(
        at org.apache.hive.hcatalog.pig.PigHCatUtil.transformToTuple(
        at org.apache.hive.hcatalog.pig.HCatBaseLoader.getNext(

2014-10-30 22:58:05,469 [main] ERROR - ERROR
6018: Error converting read value to tuple

It seems to be occuring here:

It seems like this should be:
Date d = Date.valueOf(o); 
instead of 
Date d = (Date) o;

This message was sent by Atlassian JIRA

View raw message