carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [carbondata] branch master updated: [HOTFIX]fixed loading issue for legacy store
Date Tue, 02 Apr 2019 03:46:27 GMT
This is an automated email from the ASF dual-hosted git repository.

ravipesala pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/carbondata.git


The following commit(s) were added to refs/heads/master by this push:
     new 7f05e69  [HOTFIX]fixed loading issue for legacy store
7f05e69 is described below

commit 7f05e6948e80ab5308884775fa97cf45a4bfca8e
Author: akashrn5 <akashnilugal@gmail.com>
AuthorDate: Fri Mar 29 21:07:39 2019 +0530

    [HOTFIX]fixed loading issue for legacy store
    
    fixed loading issue for legacy store
    
    This closes #3170
---
 .../org/apache/carbondata/core/datastore/TableSpec.java     | 13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/core/src/main/java/org/apache/carbondata/core/datastore/TableSpec.java b/core/src/main/java/org/apache/carbondata/core/datastore/TableSpec.java
index d0b8b3c..1b5cfb5 100644
--- a/core/src/main/java/org/apache/carbondata/core/datastore/TableSpec.java
+++ b/core/src/main/java/org/apache/carbondata/core/datastore/TableSpec.java
@@ -84,19 +84,20 @@ public class TableSpec {
     List<DimensionSpec> dictDimensionSpec = new ArrayList<>();
     int dimIndex = 0;
     DimensionSpec spec;
-    short actualPosition = 0;
+    short dictActualPosition = 0;
+    short noDictActualPosition = 0;
     // sort step's output is based on sort column order i.e sort columns data will be present
     // ahead of non sort columns, so table spec also need to add dimension spec in same manner
     for (int i = 0; i < dimensions.size(); i++) {
       CarbonDimension dimension = dimensions.get(i);
       if (dimension.isComplex()) {
-        spec = new DimensionSpec(ColumnType.COMPLEX, dimension, actualPosition++);
+        spec = new DimensionSpec(ColumnType.COMPLEX, dimension, noDictActualPosition++);
         dimensionSpec[dimIndex++] = spec;
         noDictionaryDimensionSpec.add(spec);
         noSortNoDictDimSpec.add(spec);
       } else if (dimension.getDataType() == DataTypes.TIMESTAMP && !dimension
           .isDirectDictionaryEncoding()) {
-        spec = new DimensionSpec(ColumnType.PLAIN_VALUE, dimension, actualPosition++);
+        spec = new DimensionSpec(ColumnType.PLAIN_VALUE, dimension, noDictActualPosition++);
         dimensionSpec[dimIndex++] = spec;
         noDictionaryDimensionSpec.add(spec);
         if (dimension.isSortColumn()) {
@@ -105,7 +106,7 @@ public class TableSpec {
           noSortNoDictDimSpec.add(spec);
         }
       } else if (dimension.isDirectDictionaryEncoding()) {
-        spec = new DimensionSpec(ColumnType.DIRECT_DICTIONARY, dimension, actualPosition++);
+        spec = new DimensionSpec(ColumnType.DIRECT_DICTIONARY, dimension, dictActualPosition++);
         dimensionSpec[dimIndex++] = spec;
         dictDimensionSpec.add(spec);
         if (dimension.isSortColumn()) {
@@ -114,7 +115,7 @@ public class TableSpec {
           noSortDictDimSpec.add(spec);
         }
       } else if (dimension.isGlobalDictionaryEncoding()) {
-        spec = new DimensionSpec(ColumnType.GLOBAL_DICTIONARY, dimension, actualPosition++);
+        spec = new DimensionSpec(ColumnType.GLOBAL_DICTIONARY, dimension, dictActualPosition++);
         dimensionSpec[dimIndex++] = spec;
         dictDimensionSpec.add(spec);
         if (dimension.isSortColumn()) {
@@ -123,7 +124,7 @@ public class TableSpec {
           noSortDictDimSpec.add(spec);
         }
       } else {
-        spec = new DimensionSpec(ColumnType.PLAIN_VALUE, dimension, actualPosition++);
+        spec = new DimensionSpec(ColumnType.PLAIN_VALUE, dimension, noDictActualPosition++);
         dimensionSpec[dimIndex++] = spec;
         noDictionaryDimensionSpec.add(spec);
         if (dimension.isSortColumn()) {


Mime
View raw message