carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [48/50] [abbrv] carbondata git commit: [CARBONDATA-1533] Fixed decimal data load fail issue and restricted max characters per column
Date Tue, 10 Oct 2017 03:08:35 GMT
[CARBONDATA-1533] Fixed decimal data load fail issue and restricted max characters per column

1. Fixed data load failure when both precision and data falls in integer range for decimal
data type.
2. Restricted max characters per column to 32000 as we use short to store the length of each
column

This closes #1395


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

Branch: refs/heads/streaming_ingest
Commit: ad25ffc31ec5d2b74207fc55b2c66bda8443eb7a
Parents: ccdcc3c
Author: manishgupta88 <tomanishgupta18@gmail.com>
Authored: Thu Sep 28 17:03:46 2017 +0530
Committer: Jacky Li <jacky.likun@qq.com>
Committed: Tue Oct 10 10:38:17 2017 +0800

----------------------------------------------------------------------
 .../encoding/adaptive/AdaptiveIntegralCodec.java    |  3 +++
 .../src/test/resources/badrecords/bigtab.csv        |  2 +-
 .../src/test/resources/badrecords/bigtabbad.csv     |  3 ---
 .../src/test/resources/decimal_int_range.csv        |  4 ++++
 .../spark/testsuite/bigdecimal/TestBigDecimal.scala | 16 ++++++++++++++++
 .../processing/loading/csvinput/CSVInputFormat.java |  5 ++++-
 6 files changed, 28 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/ad25ffc3/core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java
b/core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java
index c7c10a5..bbc28a6 100644
--- a/core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java
+++ b/core/src/main/java/org/apache/carbondata/core/datastore/page/encoding/adaptive/AdaptiveIntegralCodec.java
@@ -138,6 +138,9 @@ public class AdaptiveIntegralCodec extends AdaptiveCodec {
         case SHORT_INT:
           encodedPage.putShortInt(rowId, value);
           break;
+        case INT:
+          encodedPage.putInt(rowId, value);
+          break;
         default:
           throw new RuntimeException("internal error: " + debugInfo());
       }


Mime
View raw message