carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From qiang...@apache.org
Subject carbondata git commit: [CARBONDATA-1991] Select query from a streaming table throws ClassCastException
Date Mon, 29 Jan 2018 08:11:29 GMT
Repository: carbondata
Updated Branches:
  refs/heads/master 90aeaa65c -> 241b2657a


[CARBONDATA-1991] Select query from a streaming table throws ClassCastException

This closes #1778


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

Branch: refs/heads/master
Commit: 241b2657aea0d7ac111a34b2f01631b30a7eaa50
Parents: 90aeaa6
Author: anubhav100 <anubhav.tarar@knoldus.in>
Authored: Mon Jan 8 18:11:47 2018 +0530
Committer: QiangCai <qiangcai@qq.com>
Committed: Mon Jan 29 16:09:09 2018 +0800

----------------------------------------------------------------------
 .../carbondata/hadoop/streaming/CarbonStreamRecordReader.java      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/241b2657/hadoop/src/main/java/org/apache/carbondata/hadoop/streaming/CarbonStreamRecordReader.java
----------------------------------------------------------------------
diff --git a/hadoop/src/main/java/org/apache/carbondata/hadoop/streaming/CarbonStreamRecordReader.java
b/hadoop/src/main/java/org/apache/carbondata/hadoop/streaming/CarbonStreamRecordReader.java
index 0086a3c..19626f0 100644
--- a/hadoop/src/main/java/org/apache/carbondata/hadoop/streaming/CarbonStreamRecordReader.java
+++ b/hadoop/src/main/java/org/apache/carbondata/hadoop/streaming/CarbonStreamRecordReader.java
@@ -699,7 +699,7 @@ public class CarbonStreamRecordReader extends RecordReader<Void, Object>
{
           col.putByteArray(rowId, v.getBytes());
         } else if (t instanceof org.apache.spark.sql.types.DecimalType) {
           DecimalType dt = (DecimalType)t;
-          Decimal d = (Decimal) value;
+          Decimal d = Decimal.fromDecimal(value);
           if (dt.precision() <= Decimal.MAX_INT_DIGITS()) {
             col.putInt(rowId, (int)d.toUnscaledLong());
           } else if (dt.precision() <= Decimal.MAX_LONG_DIGITS()) {


Mime
View raw message