carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [05/10] carbondata git commit: [CARBONDATA-1539] Change data type from enum to class
Date Fri, 13 Oct 2017 09:26:54 GMT
http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/main/java/org/apache/carbondata/core/util/comparator/Comparator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/comparator/Comparator.java b/core/src/main/java/org/apache/carbondata/core/util/comparator/Comparator.java
index 5681364..a43ed0f 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/comparator/Comparator.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/comparator/Comparator.java
@@ -20,26 +20,25 @@ package org.apache.carbondata.core.util.comparator;
 import java.math.BigDecimal;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.util.ByteUtil;
 
 public final class Comparator {
 
   public static SerializableComparator getComparator(DataType dataType) {
-    switch (dataType) {
-      case INT:
-        return new IntSerializableComparator();
-      case SHORT:
-        return new ShortSerializableComparator();
-      case DOUBLE:
-        return new DoubleSerializableComparator();
-      case LONG:
-      case DATE:
-      case TIMESTAMP:
-        return new LongSerializableComparator();
-      case DECIMAL:
-        return new BigDecimalSerializableComparator();
-      default:
-        return new ByteArraySerializableComparator();
+    if (dataType == DataTypes.INT) {
+      return new IntSerializableComparator();
+    } else if (dataType == DataTypes.SHORT) {
+      return new ShortSerializableComparator();
+    } else if (dataType == DataTypes.DOUBLE) {
+      return new DoubleSerializableComparator();
+    } else if (dataType == DataTypes.LONG || dataType == DataTypes.DATE
+        || dataType == DataTypes.TIMESTAMP) {
+      return new LongSerializableComparator();
+    } else if (dataType == DataTypes.DECIMAL) {
+      return new BigDecimalSerializableComparator();
+    } else {
+      return new ByteArraySerializableComparator();
     }
   }
 
@@ -50,19 +49,18 @@ public final class Comparator {
    * @return
    */
   public static SerializableComparator getComparatorByDataTypeForMeasure(DataType dataType) {
-    switch (dataType) {
-      case INT:
-        return new IntSerializableComparator();
-      case SHORT:
-        return new ShortSerializableComparator();
-      case LONG:
-        return new LongSerializableComparator();
-      case DOUBLE:
-        return new DoubleSerializableComparator();
-      case DECIMAL:
-        return new BigDecimalSerializableComparator();
-      default:
-        throw new IllegalArgumentException("Unsupported data type");
+    if (dataType == DataTypes.INT) {
+      return new IntSerializableComparator();
+    } else if (dataType == DataTypes.SHORT) {
+      return new ShortSerializableComparator();
+    } else if (dataType == DataTypes.LONG) {
+      return new LongSerializableComparator();
+    } else if (dataType == DataTypes.DOUBLE) {
+      return new DoubleSerializableComparator();
+    } else if (dataType == DataTypes.DECIMAL) {
+      return new BigDecimalSerializableComparator();
+    } else {
+      throw new IllegalArgumentException("Unsupported data type");
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java
index 5235dd7..4396d6a 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java
@@ -22,6 +22,7 @@ import java.util.Date;
 
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.util.CarbonUtil;
 
 /**
@@ -61,68 +62,64 @@ public class CarbonDictionarySortModel implements Comparable<CarbonDictionarySor
    * Compare
    */
   @Override public int compareTo(CarbonDictionarySortModel o) {
-    switch (dataType) {
-      case SHORT:
-      case INT:
-      case LONG:
-      case DOUBLE:
-
-        Double d1 = null;
-        Double d2 = null;
-        try {
-          d1 = new Double(memberValue);
-        } catch (NumberFormatException e) {
-          if (CarbonCommonConstants.MEMBER_DEFAULT_VAL.equals(o.memberValue)) {
-            return -1;
-          }
-          return 1;
-        }
-        try {
-          d2 = new Double(o.memberValue);
-        } catch (NumberFormatException e) {
+    if (dataType == DataTypes.SHORT ||
+        dataType == DataTypes.INT ||
+        dataType == DataTypes.LONG ||
+        dataType == DataTypes.DOUBLE) {
+      Double d1 = null;
+      Double d2 = null;
+      try {
+        d1 = new Double(memberValue);
+      } catch (NumberFormatException e) {
+        if (CarbonCommonConstants.MEMBER_DEFAULT_VAL.equals(o.memberValue)) {
           return -1;
         }
-        return d1.compareTo(d2);
-      case DECIMAL:
-        java.math.BigDecimal val1 = null;
-        java.math.BigDecimal val2 = null;
-        try {
-          val1 = new java.math.BigDecimal(memberValue);
-        } catch (NumberFormatException e) {
-          if (CarbonCommonConstants.MEMBER_DEFAULT_VAL.equals(o.memberValue)) {
-            return -1;
-          }
-          return 1;
-        }
-        try {
-          val2 = new java.math.BigDecimal(o.memberValue);
-        } catch (NumberFormatException e) {
+        return 1;
+      }
+      try {
+        d2 = new Double(o.memberValue);
+      } catch (NumberFormatException e) {
+        return -1;
+      }
+      return d1.compareTo(d2);
+    } else if (dataType == DataTypes.DECIMAL) {
+      java.math.BigDecimal val1 = null;
+      java.math.BigDecimal val2 = null;
+      try {
+        val1 = new java.math.BigDecimal(memberValue);
+      } catch (NumberFormatException e) {
+        if (CarbonCommonConstants.MEMBER_DEFAULT_VAL.equals(o.memberValue)) {
           return -1;
         }
-        return val1.compareTo(val2);
-      case DATE:
-      case TIMESTAMP:
-        String format = CarbonUtil.getFormatFromProperty(dataType);
-        SimpleDateFormat parser = new SimpleDateFormat(format);
-        Date date1 = null;
-        Date date2 = null;
-        try {
-          date1 = parser.parse(memberValue);
-        } catch (ParseException e) {
-          if (CarbonCommonConstants.MEMBER_DEFAULT_VAL.equals(o.memberValue)) {
-            return -1;
-          }
-          return 1;
-        }
-        try {
-          date2 = parser.parse(o.memberValue);
-        } catch (ParseException e) {
+        return 1;
+      }
+      try {
+        val2 = new java.math.BigDecimal(o.memberValue);
+      } catch (NumberFormatException e) {
+        return -1;
+      }
+      return val1.compareTo(val2);
+    } else if (dataType == DataTypes.DATE || dataType == DataTypes.TIMESTAMP) {
+      String format = CarbonUtil.getFormatFromProperty(dataType);
+      SimpleDateFormat parser = new SimpleDateFormat(format);
+      Date date1 = null;
+      Date date2 = null;
+      try {
+        date1 = parser.parse(memberValue);
+      } catch (ParseException e) {
+        if (CarbonCommonConstants.MEMBER_DEFAULT_VAL.equals(o.memberValue)) {
           return -1;
         }
-        return date1.compareTo(date2);
-      case STRING:
-      default:
-        return this.memberValue.compareTo(o.memberValue);
+        return 1;
+      }
+      try {
+        date2 = parser.parse(o.memberValue);
+      } catch (ParseException e) {
+        return -1;
+      }
+      return date1.compareTo(date2);
+    } else {
+      return this.memberValue.compareTo(o.memberValue);
     }
   }
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java
index 957ea22..d945f2f 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/AbstractDictionaryCacheTest.java
@@ -33,6 +33,7 @@ import org.apache.carbondata.core.cache.Cache;
 import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.util.path.CarbonStorePath;
 import org.apache.carbondata.core.util.path.CarbonTablePath;
 import org.apache.carbondata.core.datastore.filesystem.CarbonFile;
@@ -103,9 +104,9 @@ public class AbstractDictionaryCacheTest {
 
   protected DictionaryColumnUniqueIdentifier createDictionaryColumnUniqueIdentifier(
       String columnId) {
-	ColumnIdentifier columnIdentifier = new ColumnIdentifier(columnId, null, DataType.STRING);
+	ColumnIdentifier columnIdentifier = new ColumnIdentifier(columnId, null, DataTypes.STRING);
     return new DictionaryColumnUniqueIdentifier(carbonTableIdentifier, columnIdentifier,
-        DataType.STRING,
+        DataTypes.STRING,
         CarbonStorePath.getCarbonTablePath(carbonStorePath, carbonTableIdentifier));
   }
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ColumnDictionaryInfoTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ColumnDictionaryInfoTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ColumnDictionaryInfoTest.java
index 1784364..33121e2 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ColumnDictionaryInfoTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ColumnDictionaryInfoTest.java
@@ -24,6 +24,7 @@ import java.util.concurrent.CopyOnWriteArrayList;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.util.CarbonUtil;
 
 import mockit.Mock;
@@ -41,7 +42,7 @@ public class ColumnDictionaryInfoTest {
   private ColumnDictionaryInfo columnDictionaryInfo;
 
   @Test public void testGetIncrementalSurrogateKeyFromDictionary() {
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     List<String> evaluateResultList = Arrays.asList("china", "france");
     List<byte[]> byteValuesOfFilterMembers = convertListElementsIntoByteArray(evaluateResultList);
@@ -79,7 +80,7 @@ public class ColumnDictionaryInfoTest {
   }
 
   @Test public void testGetIncrementalSurrogateKeyFromDictionaryWithZeroSurrogate() {
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     List<String> evaluateResultList = Arrays.asList("china", "france");
     List<byte[]> byteValuesOfFilterMembers = convertListElementsIntoByteArray(evaluateResultList);
@@ -107,7 +108,7 @@ public class ColumnDictionaryInfoTest {
   }
 
   @Test public void testGetIncrementalSurrogateKeyFromDictionaryWithNullValue() {
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     List<String> evaluateResultList = Arrays.asList("@NU#LL$!");
     List<byte[]> byteValuesOfFilterMembers = convertListElementsIntoByteArray(evaluateResultList);
@@ -134,7 +135,7 @@ public class ColumnDictionaryInfoTest {
   }
 
   @Test public void testGetIncrementalSurrogateKeyFromDictionaryWithTypeException() {
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.INT);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.INT);
 
     List<String> evaluateResultList = Arrays.asList("china", "france");
     List<byte[]> byteValuesOfFilterMembers = convertListElementsIntoByteArray(evaluateResultList);
@@ -173,7 +174,7 @@ public class ColumnDictionaryInfoTest {
   }
 
   @Test public void testGetIncrementalSurrogateKeyFromDictionaryWithDoubleType() {
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.DOUBLE);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.DOUBLE);
 
     List<String> evaluateResultList = Arrays.asList("15999");
     List<byte[]> byteValuesOfFilterMembers = convertListElementsIntoByteArray(evaluateResultList);
@@ -208,7 +209,7 @@ public class ColumnDictionaryInfoTest {
   }
 
   @Test public void testGetIncrementalSurrogateKeyFromDictionaryWithIntType() {
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.INT);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.INT);
 
     List<String> evaluateResultList = Arrays.asList("998");
     List<byte[]> byteValuesOfFilterMembers = convertListElementsIntoByteArray(evaluateResultList);
@@ -243,7 +244,7 @@ public class ColumnDictionaryInfoTest {
   }
 
   @Test public void testGetIncrementalSurrogateKeyFromDictionaryWithDecimalType() {
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.DECIMAL);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.DECIMAL);
 
     List<String> evaluateResultList = Arrays.asList("150011.550");
     List<byte[]> byteValuesOfFilterMembers = convertListElementsIntoByteArray(evaluateResultList);
@@ -280,7 +281,7 @@ public class ColumnDictionaryInfoTest {
   }
 
   @Test public void testGetIncrementalSurrogateKeyFromDictionaryWithLongType() {
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.LONG);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.LONG);
 
     List<String> evaluateResultList = Arrays.asList("1500115505555");
     List<byte[]> byteValuesOfFilterMembers = convertListElementsIntoByteArray(evaluateResultList);
@@ -324,7 +325,7 @@ public class ColumnDictionaryInfoTest {
       }
     };
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     columnDictionaryInfo.dictionaryChunks = new CopyOnWriteArrayList<>();
 
@@ -347,7 +348,7 @@ public class ColumnDictionaryInfoTest {
       }
     };
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     columnDictionaryInfo.dictionaryChunks = new CopyOnWriteArrayList<>();
 
@@ -375,7 +376,7 @@ public class ColumnDictionaryInfoTest {
       }
     };
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     columnDictionaryInfo.dictionaryChunks = new CopyOnWriteArrayList<>();
 
@@ -402,7 +403,7 @@ public class ColumnDictionaryInfoTest {
       }
     };
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     columnDictionaryInfo.dictionaryChunks = new CopyOnWriteArrayList<>();
 
@@ -423,7 +424,7 @@ public class ColumnDictionaryInfoTest {
 
   @Test public void testGtSortedIndexWithMinimumSurrogateKey() {
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     columnDictionaryInfo.setSortReverseOrderIndex(Arrays.asList(1, 2, 3));
 
@@ -435,7 +436,7 @@ public class ColumnDictionaryInfoTest {
 
   @Test public void testGtSortedIndexWithMaximumSurrogateKey() {
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     columnDictionaryInfo.setSortReverseOrderIndex(Arrays.asList(1, 2, 3));
 
@@ -447,7 +448,7 @@ public class ColumnDictionaryInfoTest {
 
   @Test public void testGtSortedIndexWithSurrogateKey() {
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     columnDictionaryInfo.setSortReverseOrderIndex(Arrays.asList(1, 2, 3));
 
@@ -459,7 +460,7 @@ public class ColumnDictionaryInfoTest {
 
   @Test public void testGetSizeOfLastDictionaryChunkWithDictionaryChunkZero() {
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     final int result = columnDictionaryInfo.getSizeOfLastDictionaryChunk();
 
@@ -469,7 +470,7 @@ public class ColumnDictionaryInfoTest {
 
   @Test public void testGetSizeOfLastDictionaryChunk() {
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     columnDictionaryInfo.dictionaryChunks = new CopyOnWriteArrayList<>();
 
@@ -485,7 +486,7 @@ public class ColumnDictionaryInfoTest {
 
   @Test public void testGetDictionaryValueFromSortedIndexWithMinimumSurrogateKey() {
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     columnDictionaryInfo.setSortReverseOrderIndex(Arrays.asList(1, 2, 3));
 
@@ -496,7 +497,7 @@ public class ColumnDictionaryInfoTest {
 
   @Test public void testGetDictionaryValueFromSortedIndexWithMaximumSurrogateKey() {
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     columnDictionaryInfo.setSortReverseOrderIndex(Arrays.asList(1, 2, 3));
 
@@ -507,7 +508,7 @@ public class ColumnDictionaryInfoTest {
 
   @Test public void testGetDictionaryValueFromSortedIndex() {
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     columnDictionaryInfo.setSortReverseOrderIndex(Arrays.asList(0, 1, 2, 3));
 
@@ -521,7 +522,7 @@ public class ColumnDictionaryInfoTest {
   @Test
   public void testGetSurrogateKey() {
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
 
     byte[] value = convertListElementsIntoByteArray(Arrays.asList("china")).get(0);
 
@@ -553,7 +554,7 @@ public class ColumnDictionaryInfoTest {
   @Test
   public void testGetSurrogateKeyWithIntType() {
 
-    columnDictionaryInfo = new ColumnDictionaryInfo(DataType.INT);
+    columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.INT);
 
     byte[] value = convertListElementsIntoByteArray(Arrays.asList("998")).get(0);
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImplTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImplTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImplTest.java
index a751120..59e348b 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImplTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryCacheLoaderImplTest.java
@@ -26,7 +26,7 @@ import java.util.Map;
 
 import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.metadata.ColumnIdentifier;
-import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.reader.CarbonDictionaryReaderImpl;
 import org.apache.carbondata.core.reader.sortindex.CarbonDictionarySortIndexReaderImpl;
 import org.apache.carbondata.core.util.path.CarbonStorePath;
@@ -51,13 +51,13 @@ public class DictionaryCacheLoaderImplTest {
     Map<String, String> columnProperties = new HashMap<>();
     columnProperties.put("prop1", "value1");
     columnProperties.put("prop2", "value2");
-    columnIdentifier = new ColumnIdentifier("1", columnProperties, DataType.STRING);
+    columnIdentifier = new ColumnIdentifier("1", columnProperties, DataTypes.STRING);
     dictionaryColumnUniqueIdentifier =
         new DictionaryColumnUniqueIdentifier(carbonTableIdentifier, columnIdentifier,
             columnIdentifier.getDataType(), CarbonStorePath.getCarbonTablePath("/tmp", carbonTableIdentifier));
     dictionaryCacheLoader = new DictionaryCacheLoaderImpl(carbonTableIdentifier, "/tmp/",
         dictionaryColumnUniqueIdentifier);
-    dictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    dictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
     new MockUp<CarbonDictionaryReaderImpl>() {
       @Mock @SuppressWarnings("unused") Iterator<byte[]> read(long startOffset, long endOffset)
           throws IOException {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryColumnUniqueIdentifierTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryColumnUniqueIdentifierTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryColumnUniqueIdentifierTest.java
index 0e2eed9..ec9a19a 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryColumnUniqueIdentifierTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/DictionaryColumnUniqueIdentifierTest.java
@@ -16,20 +16,22 @@
  */
 package org.apache.carbondata.core.cache.dictionary;
 
-import mockit.Mock;
-import mockit.MockUp;
+import java.util.HashMap;
+import java.util.Map;
 
 import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 
+import mockit.Mock;
+import mockit.MockUp;
 import org.junit.BeforeClass;
 import org.junit.Test;
 
-import java.util.HashMap;
-import java.util.Map;
-
-import static junit.framework.TestCase.*;
+import static junit.framework.TestCase.assertEquals;
+import static junit.framework.TestCase.assertNotNull;
+import static junit.framework.TestCase.assertTrue;
 
 public class DictionaryColumnUniqueIdentifierTest {
 
@@ -43,21 +45,21 @@ public class DictionaryColumnUniqueIdentifierTest {
     CarbonTableIdentifier carbonTableIdentifier2 =
         new CarbonTableIdentifier("testDatabase", "testTable", "2");
     Map<String, String> properties = new HashMap<>();
-    ColumnIdentifier columnIdentifier = new ColumnIdentifier("2", properties, DataType.STRING);
-    ColumnIdentifier columnIdentifier2 = new ColumnIdentifier("1", properties, DataType.INT);
+    ColumnIdentifier columnIdentifier = new ColumnIdentifier("2", properties, DataTypes.STRING);
+    ColumnIdentifier columnIdentifier2 = new ColumnIdentifier("1", properties, DataTypes.INT);
     dictionaryColumnUniqueIdentifier1 =
         new DictionaryColumnUniqueIdentifier(carbonTableIdentifier1, columnIdentifier,
-            DataType.MAP, null);
+            DataTypes.MAP, null);
     dictionaryColumnUniqueIdentifier2 =
         new DictionaryColumnUniqueIdentifier(carbonTableIdentifier2, columnIdentifier2,
-            DataType.MAP, null);
+            DataTypes.MAP, null);
     dictionaryColumnUniqueIdentifier3 =
         new DictionaryColumnUniqueIdentifier(carbonTableIdentifier2, columnIdentifier,
-            DataType.MAP, null);
+            DataTypes.MAP, null);
   }
 
   @Test public void testToGetDataType() {
-    assertEquals(dictionaryColumnUniqueIdentifier1.getDataType(), DataType.MAP);
+    assertEquals(dictionaryColumnUniqueIdentifier1.getDataType(), DataTypes.MAP);
   }
 
   @Test public void testForEqualsWithDifferentObjectsWithDifferentColumnIdentifier() {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ForwardDictionaryTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ForwardDictionaryTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ForwardDictionaryTest.java
index 559dcb0..e84eb06 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ForwardDictionaryTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ForwardDictionaryTest.java
@@ -20,6 +20,7 @@ import mockit.Mock;
 import mockit.MockUp;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -35,7 +36,7 @@ public class ForwardDictionaryTest {
   private static ForwardDictionary forwardDictionary;
 
   @BeforeClass public static void setUp() {
-    ColumnDictionaryInfo columnDictionaryInfo = new ColumnDictionaryInfo(DataType.INT);
+    ColumnDictionaryInfo columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.INT);
     forwardDictionary = new ForwardDictionary(columnDictionaryInfo);
   }
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java
index b06fc4d..d3d5658 100644
--- a/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/cache/dictionary/ReverseDictionaryCacheTest.java
@@ -36,6 +36,7 @@ import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.metadata.datatype.DataType;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.reader.CarbonDictionaryColumnMetaChunk;
 import org.apache.carbondata.core.util.CarbonProperties;
 
@@ -270,7 +271,7 @@ public class ReverseDictionaryCacheTest extends AbstractDictionaryCacheTest {
   }
   protected DictionaryColumnUniqueIdentifier createDictionaryColumnUniqueIdentifier(
 	      String columnId) {
-	    ColumnIdentifier columnIdentifier = new ColumnIdentifier(columnId, null, DataType.DOUBLE);
+	    ColumnIdentifier columnIdentifier = new ColumnIdentifier(columnId, null, DataTypes.DOUBLE);
     return new DictionaryColumnUniqueIdentifier(carbonTableIdentifier, columnIdentifier);
 	  }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/carbon/ColumnIdentifierTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/carbon/ColumnIdentifierTest.java b/core/src/test/java/org/apache/carbondata/core/carbon/ColumnIdentifierTest.java
index d5af5c3..f7696f7 100644
--- a/core/src/test/java/org/apache/carbondata/core/carbon/ColumnIdentifierTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/carbon/ColumnIdentifierTest.java
@@ -18,6 +18,7 @@ package org.apache.carbondata.core.carbon;
 
 import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -35,7 +36,7 @@ public class ColumnIdentifierTest {
   @BeforeClass public static void setup() {
     columnProperties = new HashMap<String, String>();
     columnProperties.put("key", "value");
-    columnIdentifier = new ColumnIdentifier("columnId", columnProperties, DataType.INT);
+    columnIdentifier = new ColumnIdentifier("columnId", columnProperties, DataTypes.INT);
   }
 
   @Test public void hashCodeTest() {
@@ -51,7 +52,7 @@ public class ColumnIdentifierTest {
 
   @Test public void equalsTestwithSimilarObject() {
     ColumnIdentifier columnIdentifierTest =
-        new ColumnIdentifier("columnId", columnProperties, DataType.INT);
+        new ColumnIdentifier("columnId", columnProperties, DataTypes.INT);
     Boolean res = columnIdentifier.equals(columnIdentifierTest);
     assert (res);
   }
@@ -68,14 +69,14 @@ public class ColumnIdentifierTest {
 
   @Test public void equalsTestwithNullColumnId() {
     ColumnIdentifier columnIdentifierTest =
-        new ColumnIdentifier(null, columnProperties, DataType.INT);
+        new ColumnIdentifier(null, columnProperties, DataTypes.INT);
     Boolean res = columnIdentifierTest.equals(columnIdentifier);
     assert (!res);
   }
 
   @Test public void equalsTestwithDiffColumnId() {
     ColumnIdentifier columnIdentifierTest =
-        new ColumnIdentifier("diffColumnId", columnProperties, DataType.INT);
+        new ColumnIdentifier("diffColumnId", columnProperties, DataTypes.INT);
     Boolean res = columnIdentifierTest.equals(columnIdentifier);
     assert (!res);
   }
@@ -87,7 +88,7 @@ public class ColumnIdentifierTest {
 
   @Test public void getColumnPropertyTest() {
     ColumnIdentifier columnIdentifierTest =
-        new ColumnIdentifier("diffColumnId", null, DataType.INT);
+        new ColumnIdentifier("diffColumnId", null, DataTypes.INT);
     String res = columnIdentifierTest.getColumnProperty("key");
     assertEquals(res, null);
   }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTest.java
index f6defec..2020dd8 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTest.java
@@ -24,10 +24,10 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.UUID;
 
-import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.metadata.encoder.Encoding;
 import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
 
 import junit.framework.TestCase;
 import org.junit.BeforeClass;
@@ -173,7 +173,7 @@ public class SegmentPropertiesTest extends TestCase {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -188,7 +188,7 @@ public class SegmentPropertiesTest extends TestCase {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI1");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -202,7 +202,7 @@ public class SegmentPropertiesTest extends TestCase {
     dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI2");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -218,7 +218,7 @@ public class SegmentPropertiesTest extends TestCase {
     dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI3");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -234,7 +234,7 @@ public class SegmentPropertiesTest extends TestCase {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI4");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -248,7 +248,7 @@ public class SegmentPropertiesTest extends TestCase {
     dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI9");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -264,7 +264,7 @@ public class SegmentPropertiesTest extends TestCase {
     dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI10");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -280,7 +280,7 @@ public class SegmentPropertiesTest extends TestCase {
     dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI11");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -296,7 +296,7 @@ public class SegmentPropertiesTest extends TestCase {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI5");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.ARRAY);
+    dimColumn.setDataType(DataTypes.ARRAY);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -311,7 +311,7 @@ public class SegmentPropertiesTest extends TestCase {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI6");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -325,7 +325,7 @@ public class SegmentPropertiesTest extends TestCase {
     ColumnSchema dimColumn = new ColumnSchema();
     dimColumn.setColumnName("IMEI_COUNT");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
     encodeList.add(Encoding.DELTA);
@@ -337,7 +337,7 @@ public class SegmentPropertiesTest extends TestCase {
     ColumnSchema dimColumn = new ColumnSchema();
     dimColumn.setColumnName("IMEI_COUNT1");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
     encodeList.add(Encoding.DELTA);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTestUtil.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTestUtil.java b/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTestUtil.java
index 5a941b3..1f9c712 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTestUtil.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentPropertiesTestUtil.java
@@ -21,6 +21,7 @@ import java.util.List;
 import java.util.UUID;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.metadata.encoder.Encoding;
 import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
@@ -55,7 +56,7 @@ public class SegmentPropertiesTestUtil {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -70,7 +71,7 @@ public class SegmentPropertiesTestUtil {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI1");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -84,7 +85,7 @@ public class SegmentPropertiesTestUtil {
     dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI2");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -100,7 +101,7 @@ public class SegmentPropertiesTestUtil {
     dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI3");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -116,7 +117,7 @@ public class SegmentPropertiesTestUtil {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI4");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -130,7 +131,7 @@ public class SegmentPropertiesTestUtil {
     dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI9");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -146,7 +147,7 @@ public class SegmentPropertiesTestUtil {
     dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI10");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -162,7 +163,7 @@ public class SegmentPropertiesTestUtil {
     dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI11");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -178,7 +179,7 @@ public class SegmentPropertiesTestUtil {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI5");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.ARRAY);
+    dimColumn.setDataType(DataTypes.ARRAY);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -193,7 +194,7 @@ public class SegmentPropertiesTestUtil {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI6");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -207,7 +208,7 @@ public class SegmentPropertiesTestUtil {
     ColumnSchema dimColumn = new ColumnSchema();
     dimColumn.setColumnName("IMEI_COUNT");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
     encodeList.add(Encoding.DELTA);
@@ -219,7 +220,7 @@ public class SegmentPropertiesTestUtil {
     ColumnSchema dimColumn = new ColumnSchema();
     dimColumn.setColumnName("IMEI_COUNT1");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
     encodeList.add(Encoding.DELTA);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/datastore/page/encoding/RLECodecSuite.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/page/encoding/RLECodecSuite.java b/core/src/test/java/org/apache/carbondata/core/datastore/page/encoding/RLECodecSuite.java
index 79d3388..be898c2 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/page/encoding/RLECodecSuite.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/page/encoding/RLECodecSuite.java
@@ -28,6 +28,7 @@ import org.apache.carbondata.core.datastore.page.encoding.rle.RLEEncoderMeta;
 import org.apache.carbondata.core.datastore.page.statistics.PrimitivePageStatsCollector;
 import org.apache.carbondata.core.memory.MemoryException;
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 
 import org.junit.AfterClass;
 import org.junit.BeforeClass;
@@ -45,9 +46,9 @@ public class RLECodecSuite {
     TestData(byte[] inputByteData, byte[] expectedEncodedByteData) throws IOException, MemoryException {
       this.inputByteData = inputByteData;
       inputBytePage = ColumnPage.newPage(
-          new TableSpec.ColumnSpec("test", DataType.BYTE, ColumnType.MEASURE),
-          DataType.BYTE, inputByteData.length);
-      inputBytePage.setStatsCollector(PrimitivePageStatsCollector.newInstance(DataType.BYTE, 0, 0));
+          new TableSpec.ColumnSpec("test", DataTypes.BYTE, ColumnType.MEASURE),
+          DataTypes.BYTE, inputByteData.length);
+      inputBytePage.setStatsCollector(PrimitivePageStatsCollector.newInstance(DataTypes.BYTE, 0, 0));
       for (int i = 0; i < inputByteData.length; i++) {
         inputBytePage.putData(i, inputByteData[i]);
       }
@@ -130,8 +131,8 @@ public class RLECodecSuite {
   private void testBytePageDecode(byte[] inputBytes, byte[] expectedDecodedBytes) throws IOException, MemoryException {
     RLECodec codec = new RLECodec();
     RLEEncoderMeta meta = new RLEEncoderMeta(
-        new TableSpec.ColumnSpec("test", DataType.BYTE, ColumnType.MEASURE),
-        DataType.BYTE, expectedDecodedBytes.length, null);
+        new TableSpec.ColumnSpec("test", DataTypes.BYTE, ColumnType.MEASURE),
+        DataTypes.BYTE, expectedDecodedBytes.length, null);
     ColumnPageDecoder decoder = codec.createDecoder(meta);
     ColumnPage page = decoder.decode(inputBytes, 0, inputBytes.length);
     byte[] decoded = page.getBytePage();

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/keygenerator/directdictionary/DirectDictionaryKeyGeneratorFactoryUnitTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/keygenerator/directdictionary/DirectDictionaryKeyGeneratorFactoryUnitTest.java b/core/src/test/java/org/apache/carbondata/core/keygenerator/directdictionary/DirectDictionaryKeyGeneratorFactoryUnitTest.java
index 52cda28..c077eeb 100644
--- a/core/src/test/java/org/apache/carbondata/core/keygenerator/directdictionary/DirectDictionaryKeyGeneratorFactoryUnitTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/keygenerator/directdictionary/DirectDictionaryKeyGeneratorFactoryUnitTest.java
@@ -18,6 +18,7 @@
 package org.apache.carbondata.core.keygenerator.directdictionary;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 
 import org.junit.Assert;
 import org.junit.Test;
@@ -30,13 +31,13 @@ public class DirectDictionaryKeyGeneratorFactoryUnitTest {
 
     int expectedResult = 1;
     DirectDictionaryGenerator result =
-        DirectDictionaryKeyGeneratorFactory.getDirectDictionaryGenerator(DataType.TIMESTAMP);
+        DirectDictionaryKeyGeneratorFactory.getDirectDictionaryGenerator(DataTypes.TIMESTAMP);
     assertEquals (expectedResult,result.generateDirectSurrogateKey("TimeStamp"));
   }
 
   @Test public void testGetDirectDictionaryGeneratorReturnNull() throws Exception {
     DirectDictionaryGenerator result =
-        DirectDictionaryKeyGeneratorFactory.getDirectDictionaryGenerator(DataType.ARRAY);
+        DirectDictionaryKeyGeneratorFactory.getDirectDictionaryGenerator(DataTypes.ARRAY);
     Assert.assertNull(result);
   }
 }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/metadata/CarbonMetadataTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/metadata/CarbonMetadataTest.java b/core/src/test/java/org/apache/carbondata/core/metadata/CarbonMetadataTest.java
index 3af0bdb..ddb5e3a 100644
--- a/core/src/test/java/org/apache/carbondata/core/metadata/CarbonMetadataTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/metadata/CarbonMetadataTest.java
@@ -21,6 +21,7 @@ import java.util.List;
 import java.util.UUID;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.metadata.encoder.Encoding;
 import org.apache.carbondata.core.metadata.schema.table.CarbonTable;
 import org.apache.carbondata.core.metadata.schema.table.TableInfo;
@@ -120,7 +121,7 @@ public class CarbonMetadataTest {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -134,7 +135,7 @@ public class CarbonMetadataTest {
     ColumnSchema dimColumn = new ColumnSchema();
     dimColumn.setColumnName("IMEI_COUNT");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     return dimColumn;
   }
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImplTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImplTest.java b/core/src/test/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImplTest.java
index 3961d9c..8bce684 100644
--- a/core/src/test/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImplTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/metadata/converter/ThriftWrapperSchemaConverterImplTest.java
@@ -22,6 +22,7 @@ import java.util.List;
 import java.util.Map;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.metadata.encoder.Encoding;
 import org.apache.carbondata.core.metadata.schema.SchemaEvolution;
 import org.apache.carbondata.core.metadata.schema.SchemaEvolutionEntry;
@@ -265,7 +266,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.BOOLEAN;
+        return DataTypes.BOOLEAN;
       }
 
       @Mock public String getColumnName() {
@@ -349,7 +350,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.BOOLEAN;
+        return DataTypes.BOOLEAN;
       }
 
       @Mock public String getColumnName() {
@@ -426,7 +427,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.BOOLEAN;
+        return DataTypes.BOOLEAN;
       }
 
       @Mock public String getColumnName() {
@@ -500,7 +501,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.STRING;
+        return DataTypes.STRING;
       }
 
       @Mock public String getColumnName() {
@@ -575,7 +576,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.INT;
+        return DataTypes.INT;
       }
 
       @Mock public String getColumnName() {
@@ -648,7 +649,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.SHORT;
+        return DataTypes.SHORT;
       }
 
       @Mock public String getColumnName() {
@@ -722,7 +723,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.LONG;
+        return DataTypes.LONG;
       }
 
       @Mock public String getColumnName() {
@@ -796,7 +797,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.DOUBLE;
+        return DataTypes.DOUBLE;
       }
 
       @Mock public String getColumnName() {
@@ -869,7 +870,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.DECIMAL;
+        return DataTypes.DECIMAL;
       }
 
       @Mock public String getColumnName() {
@@ -944,7 +945,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.TIMESTAMP;
+        return DataTypes.TIMESTAMP;
       }
 
       @Mock public String getColumnName() {
@@ -1018,7 +1019,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.ARRAY;
+        return DataTypes.ARRAY;
       }
 
       @Mock public String getColumnName() {
@@ -1092,7 +1093,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.STRUCT;
+        return DataTypes.STRUCT;
       }
 
       @Mock public String getColumnName() {
@@ -1241,7 +1242,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.BOOLEAN;
+        return DataTypes.BOOLEAN;
       }
 
       @Mock public String getColumnName() {
@@ -1326,7 +1327,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.BOOLEAN;
+        return DataTypes.BOOLEAN;
       }
 
       @Mock public String getColumnName() {
@@ -1444,7 +1445,7 @@ public class ThriftWrapperSchemaConverterImplTest {
       }
 
       @Mock public DataType getDataType() {
-        return DataType.BOOLEAN;
+        return DataTypes.BOOLEAN;
       }
 
       @Mock public String getColumnName() {
@@ -1539,7 +1540,7 @@ long time =1112745600000L;
     wrapperColumnSchema.setColumnUniqueId("1");
     wrapperColumnSchema.setColumnName("columnName");
     wrapperColumnSchema.setColumnar(true);
-    wrapperColumnSchema.setDataType(DataType.STRING);
+    wrapperColumnSchema.setDataType(DataTypes.STRING);
     wrapperColumnSchema.setDimensionColumn(true);
     wrapperColumnSchema.setEncodingList(encodings);
     wrapperColumnSchema.setNumberOfChild(1);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableTest.java b/core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableTest.java
index f5ffe51..fa5765a 100644
--- a/core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableTest.java
@@ -21,6 +21,7 @@ import java.util.List;
 import java.util.UUID;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.metadata.encoder.Encoding;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension;
 import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
@@ -73,7 +74,7 @@ public class CarbonTableTest extends TestCase {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -87,7 +88,7 @@ public class CarbonTableTest extends TestCase {
     ColumnSchema dimColumn = new ColumnSchema();
     dimColumn.setColumnName("IMEI_COUNT");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     return dimColumn;
   }
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableWithComplexTypesTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableWithComplexTypesTest.java b/core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableWithComplexTypesTest.java
index 69cab49..4979038 100644
--- a/core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableWithComplexTypesTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/metadata/schema/table/CarbonTableWithComplexTypesTest.java
@@ -20,10 +20,10 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.UUID;
 
-import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.constants.CarbonCommonConstants;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.metadata.encoder.Encoding;
 import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
 
 import junit.framework.TestCase;
 import org.junit.AfterClass;
@@ -70,7 +70,7 @@ public class CarbonTableWithComplexTypesTest extends TestCase {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     List<Encoding> encodeList =
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
@@ -83,7 +83,7 @@ public class CarbonTableWithComplexTypesTest extends TestCase {
     structColumn.setColumnar(true);
     structColumn.setColumnName("mobile");
     structColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    structColumn.setDataType(DataType.STRUCT);
+    structColumn.setDataType(DataTypes.STRUCT);
     structColumn.setDimensionColumn(true);
     structColumn.setEncodingList(encodeList);
     structColumn.setNumberOfChild(2);
@@ -93,7 +93,7 @@ public class CarbonTableWithComplexTypesTest extends TestCase {
     primitiveColumn.setColumnar(true);
     primitiveColumn.setColumnName("mobile.stdcode");
     primitiveColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    primitiveColumn.setDataType(DataType.STRING);
+    primitiveColumn.setDataType(DataTypes.STRING);
     primitiveColumn.setDimensionColumn(true);
     primitiveColumn.setEncodingList(encodeList);
     primitiveColumn.setNumberOfChild(0);
@@ -103,7 +103,7 @@ public class CarbonTableWithComplexTypesTest extends TestCase {
     arrayColumn.setColumnar(true);
     arrayColumn.setColumnName("mobile.val");
     arrayColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    arrayColumn.setDataType(DataType.ARRAY);
+    arrayColumn.setDataType(DataTypes.ARRAY);
     arrayColumn.setDimensionColumn(true);
     arrayColumn.setEncodingList(encodeList);
     arrayColumn.setNumberOfChild(1);
@@ -113,7 +113,7 @@ public class CarbonTableWithComplexTypesTest extends TestCase {
     primitiveColumn1.setColumnar(true);
     primitiveColumn1.setColumnName("mobile.val.phoneno");
     primitiveColumn1.setColumnUniqueId(UUID.randomUUID().toString());
-    primitiveColumn1.setDataType(DataType.STRING);
+    primitiveColumn1.setDataType(DataTypes.STRING);
     primitiveColumn1.setDimensionColumn(true);
     primitiveColumn1.setEncodingList(encodeList);
     primitiveColumn1.setNumberOfChild(0);
@@ -126,7 +126,7 @@ public class CarbonTableWithComplexTypesTest extends TestCase {
     ColumnSchema dimColumn = new ColumnSchema();
     dimColumn.setColumnName("IMEI_COUNT");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(false);
     return dimColumn;
   }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollectorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollectorTest.java b/core/src/test/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollectorTest.java
index 55de2e2..85bdfd8 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollectorTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollectorTest.java
@@ -49,7 +49,7 @@ public class RawBasedResultCollectorTest {
 //    aggregatorInfo.setMeasureExists(new boolean[] { true, false, false, false });
 //    aggregatorInfo.setDefaultValues(new Object[] { 1, 2, 3, 4 });
 //    aggregatorInfo.setMeasureDataTypes(
-//        new DataType[] { DataType.INT, DataType.TIMESTAMP, DataType.INT, DataType.INT });
+//        new DataType[] { DataTypes.INT, DataTypes.TIMESTAMP, DataTypes.INT, DataTypes.INT });
 //    QueryMeasure queryMeasure1 = new QueryMeasure("QMCol1");
 //    queryMeasure1.setQueryOrder(1);
 //    QueryMeasure queryMeasure2 = new QueryMeasure("QMCol2");

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/scan/complextypes/PrimitiveQueryTypeTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/complextypes/PrimitiveQueryTypeTest.java b/core/src/test/java/org/apache/carbondata/core/scan/complextypes/PrimitiveQueryTypeTest.java
index 6beb81c..0915d78 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/complextypes/PrimitiveQueryTypeTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/complextypes/PrimitiveQueryTypeTest.java
@@ -25,6 +25,7 @@ import org.apache.carbondata.core.metadata.datatype.DataType;
 import org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryGenerator;
 import org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryKeyGeneratorFactory;
 import org.apache.carbondata.core.keygenerator.mdkey.Bits;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.util.DataTypeUtil;
 
 import mockit.Mock;
@@ -53,27 +54,27 @@ public class PrimitiveQueryTypeTest {
     int keySize = 1;
     boolean isDirectDictionary = true;
     primitiveQueryType =
-        new PrimitiveQueryType(name, parentName, blockIndex, DataType.STRING, keySize, dictionary,
+        new PrimitiveQueryType(name, parentName, blockIndex, DataTypes.STRING, keySize, dictionary,
             isDirectDictionary);
     primitiveQueryTypeForInt =
-        new PrimitiveQueryType(name, parentName, blockIndex, DataType.INT, keySize, dictionary,
+        new PrimitiveQueryType(name, parentName, blockIndex, DataTypes.INT, keySize, dictionary,
             isDirectDictionary);
     primitiveQueryTypeForDouble =
-        new PrimitiveQueryType(name, parentName, blockIndex, DataType.DOUBLE, keySize, dictionary,
+        new PrimitiveQueryType(name, parentName, blockIndex, DataTypes.DOUBLE, keySize, dictionary,
             isDirectDictionary);
     primitiveQueryTypeForLong =
-        new PrimitiveQueryType(name, parentName, blockIndex, DataType.LONG, keySize, dictionary,
+        new PrimitiveQueryType(name, parentName, blockIndex, DataTypes.LONG, keySize, dictionary,
             isDirectDictionary);
     primitiveQueryTypeForBoolean =
-        new PrimitiveQueryType(name, parentName, blockIndex, DataType.BOOLEAN, keySize, dictionary,
+        new PrimitiveQueryType(name, parentName, blockIndex, DataTypes.BOOLEAN, keySize, dictionary,
             isDirectDictionary);
     primitiveQueryTypeForTimeStamp =
-        new PrimitiveQueryType(name, parentName, blockIndex, DataType.TIMESTAMP, keySize,
+        new PrimitiveQueryType(name, parentName, blockIndex, DataTypes.TIMESTAMP, keySize,
             dictionary, isDirectDictionary);
-    ColumnDictionaryInfo columnDictionaryInfo = new ColumnDictionaryInfo(DataType.STRING);
+    ColumnDictionaryInfo columnDictionaryInfo = new ColumnDictionaryInfo(DataTypes.STRING);
     ForwardDictionary forwardDictionary = new ForwardDictionary(columnDictionaryInfo);
     primitiveQueryTypeForTimeStampForIsDictionaryFalse =
-        new PrimitiveQueryType(name, parentName, blockIndex, DataType.TIMESTAMP, keySize,
+        new PrimitiveQueryType(name, parentName, blockIndex, DataTypes.TIMESTAMP, keySize,
             forwardDictionary, false);
 
   }
@@ -141,11 +142,11 @@ public class PrimitiveQueryTypeTest {
     Object actualData = null;
     if (isDirectDictionary) {
       DirectDictionaryGenerator directDictionaryGenerator =
-          DirectDictionaryKeyGeneratorFactory.getDirectDictionaryGenerator(DataType.TIMESTAMP);
+          DirectDictionaryKeyGeneratorFactory.getDirectDictionaryGenerator(DataTypes.TIMESTAMP);
       actualData = directDictionaryGenerator.getValueFromSurrogate(surrgateValue);
     } else {
       String dictionaryValueForKey = dictionary.getDictionaryValueForKey(surrgateValue);
-      actualData = DataTypeUtil.getDataBasedOnDataType(dictionaryValueForKey, DataType.TIMESTAMP);
+      actualData = DataTypeUtil.getDataBasedOnDataType(dictionaryValueForKey, DataTypes.TIMESTAMP);
     }
     return actualData;
   }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/scan/executor/util/RestructureUtilTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/executor/util/RestructureUtilTest.java b/core/src/test/java/org/apache/carbondata/core/scan/executor/util/RestructureUtilTest.java
index df14381..048b194 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/executor/util/RestructureUtilTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/executor/util/RestructureUtilTest.java
@@ -16,7 +16,12 @@
  */
 package org.apache.carbondata.core.scan.executor.util;
 
-import org.apache.carbondata.core.metadata.datatype.DataType;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.UUID;
+
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.metadata.encoder.Encoding;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonMeasure;
@@ -32,11 +37,6 @@ import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.MatcherAssert.assertThat;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.UUID;
-
 public class RestructureUtilTest {
 
   @Test public void testToGetUpdatedQueryDimension() {
@@ -99,15 +99,15 @@ public class RestructureUtilTest {
   @Test public void testToGetAggregatorInfos() {
     ColumnSchema columnSchema1 = new ColumnSchema();
     columnSchema1.setColumnName("Id");
-    columnSchema1.setDataType(DataType.STRING);
+    columnSchema1.setDataType(DataTypes.STRING);
     columnSchema1.setColumnUniqueId(UUID.randomUUID().toString());
     ColumnSchema columnSchema2 = new ColumnSchema();
     columnSchema2.setColumnName("Name");
-    columnSchema2.setDataType(DataType.STRING);
+    columnSchema2.setDataType(DataTypes.STRING);
     columnSchema2.setColumnUniqueId(UUID.randomUUID().toString());
     ColumnSchema columnSchema3 = new ColumnSchema();
     columnSchema3.setColumnName("Age");
-    columnSchema3.setDataType(DataType.STRING);
+    columnSchema3.setDataType(DataTypes.STRING);
     columnSchema3.setColumnUniqueId(UUID.randomUUID().toString());
 
     CarbonMeasure carbonMeasure1 = new CarbonMeasure(columnSchema1, 1);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/scan/expression/ColumnExpressionTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/expression/ColumnExpressionTest.java b/core/src/test/java/org/apache/carbondata/core/scan/expression/ColumnExpressionTest.java
index 865af20..f2147b2 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/expression/ColumnExpressionTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/expression/ColumnExpressionTest.java
@@ -18,6 +18,7 @@
 package org.apache.carbondata.core.scan.expression;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.scan.filter.intf.RowImpl;
 
 import mockit.Mock;
@@ -33,7 +34,7 @@ public class ColumnExpressionTest {
 
   @Before public void setUp() {
     String columnName = "IMEI";
-    DataType dataType = DataType.STRING;
+    DataType dataType = DataTypes.STRING;
     columnExpression = new ColumnExpression(columnName, dataType);
   }
 
@@ -45,7 +46,7 @@ public class ColumnExpressionTest {
         return 1;
       }
     };
-    ExpressionResult expectedValue = new ExpressionResult(DataType.INT, 1);
+    ExpressionResult expectedValue = new ExpressionResult(DataTypes.INT, 1);
     assertEquals(expectedValue, columnExpression.evaluate(rowImpl));
   }
 


Mime
View raw message