carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chenliang...@apache.org
Subject [1/2] incubator-carbondata git commit: resolved bug for date type show class cast exception when querying carbon table from hive
Date Mon, 01 May 2017 13:11:28 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/hive eda447530 -> ccb985aea


resolved bug for date type show class cast exception when querying carbon table from hive


Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/7586808e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/7586808e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/7586808e

Branch: refs/heads/hive
Commit: 7586808e83fe6bd9c015ab33cf8e034a5e97d5cd
Parents: eda4475
Author: anubhav100 <anubhav.tarar@knoldus.in>
Authored: Thu Apr 20 16:44:48 2017 +0530
Committer: anubhav100 <anubhav.tarar@knoldus.in>
Committed: Thu Apr 20 16:44:48 2017 +0530

----------------------------------------------------------------------
 .../java/org/apache/carbondata/hive/CarbonHiveRecordReader.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/7586808e/integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveRecordReader.java
----------------------------------------------------------------------
diff --git a/integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveRecordReader.java
b/integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveRecordReader.java
index ba29028..fc45d74 100644
--- a/integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveRecordReader.java
+++ b/integration/hive/src/main/java/org/apache/carbondata/hive/CarbonHiveRecordReader.java
@@ -223,7 +223,7 @@ public class CarbonHiveRecordReader extends CarbonRecordReader<ArrayWritable>
       case SHORT:
         return new ShortWritable(((Long) obj).shortValue());
       case DATE:
-        return new DateWritable(new Date(((long) obj)));
+        return new DateWritable(new Date(Long.parseLong(String.valueOf(obj.toString()))));
       case TIMESTAMP:
         return new TimestampWritable(new Timestamp((long) obj));
       case STRING:


Mime
View raw message