carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kumarvisha...@apache.org
Subject [1/2] incubator-carbondata git commit: Fixed loading issues in TPC-DS data
Date Tue, 14 Mar 2017 10:47:57 GMT
Repository: incubator-carbondata
Updated Branches:
  refs/heads/master a0ae747d2 -> 4b8000cc3


Fixed loading issues in TPC-DS data


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

Branch: refs/heads/master
Commit: 5172ec4845f437a5553c1a0b33e096bcb8b279b5
Parents: a0ae747
Author: ravipesala <ravi.pesala@gmail.com>
Authored: Tue Mar 7 12:07:48 2017 +0530
Committer: kumarvishal <kumarvishal.1802@gmail.com>
Committed: Tue Mar 14 18:45:08 2017 +0800

----------------------------------------------------------------------
 .../org/apache/carbondata/core/util/CarbonMetadataUtil.java     | 4 ++--
 .../processing/store/writer/v3/CarbonFactDataWriterImplV3.java  | 5 +++--
 2 files changed, 5 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5172ec48/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java b/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
index 5e227fb..9347977 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
@@ -864,7 +864,7 @@ public class CarbonMetadataUtil {
         firstBuffer = ByteBuffer.allocate(8);
         firstBuffer.put(first);
         secondBuffer = ByteBuffer.allocate(8);
-        secondBuffer.put(first);
+        secondBuffer.put(second);
         firstBuffer.flip();
         secondBuffer.flip();
         return (int) (firstBuffer.getDouble() - secondBuffer.getDouble());
@@ -874,7 +874,7 @@ public class CarbonMetadataUtil {
         firstBuffer = ByteBuffer.allocate(8);
         firstBuffer.put(first);
         secondBuffer = ByteBuffer.allocate(8);
-        secondBuffer.put(first);
+        secondBuffer.put(second);
         firstBuffer.flip();
         secondBuffer.flip();
         return (int) (firstBuffer.getLong() - secondBuffer.getLong());

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/5172ec48/processing/src/main/java/org/apache/carbondata/processing/store/writer/v3/CarbonFactDataWriterImplV3.java
----------------------------------------------------------------------
diff --git a/processing/src/main/java/org/apache/carbondata/processing/store/writer/v3/CarbonFactDataWriterImplV3.java
b/processing/src/main/java/org/apache/carbondata/processing/store/writer/v3/CarbonFactDataWriterImplV3.java
index 49d7ab2..bfb3683 100644
--- a/processing/src/main/java/org/apache/carbondata/processing/store/writer/v3/CarbonFactDataWriterImplV3.java
+++ b/processing/src/main/java/org/apache/carbondata/processing/store/writer/v3/CarbonFactDataWriterImplV3.java
@@ -160,7 +160,7 @@ public class CarbonFactDataWriterImplV3 extends AbstractFactDataWriter<short[]>
           compressedDataIndex[i] = getByteArray(keyStorageArray[i].getDataIndexMap());
           dataIndexMapLength[i] = compressedDataIndex[i].length;
         } catch (Exception e) {
-          throw new CarbonDataWriterException(e.getMessage());
+          throw new CarbonDataWriterException(e.getMessage(), e);
         }
       }
     }
@@ -229,7 +229,7 @@ public class CarbonFactDataWriterImplV3 extends AbstractFactDataWriter<short[]>
    */
   private byte[] getByteArray(short[] data) {
     ByteBuffer buffer = ByteBuffer.allocate(data.length * 2);
-    for (short i = 0; i < data.length; i++) {
+    for (int i = 0; i < data.length; i++) {
       buffer.putShort(data[i]);
     }
     buffer.flip();
@@ -467,6 +467,7 @@ public class CarbonFactDataWriterImplV3 extends AbstractFactDataWriter<short[]>
             < 0) {
           currentMaxValue[j] = maxValue.clone();
         }
+        measureIndex++;
       }
     }
     BlockletBTreeIndex btree =


Mime
View raw message