carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [03/10] carbondata git commit: [CARBONDATA-1539] Change data type from enum to class
Date Fri, 13 Oct 2017 09:26:52 GMT
http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/NotEqualsExpressionUnitTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/NotEqualsExpressionUnitTest.java b/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/NotEqualsExpressionUnitTest.java
index 35e784c..1cb008c 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/NotEqualsExpressionUnitTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/NotEqualsExpressionUnitTest.java
@@ -24,6 +24,7 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.scan.expression.ColumnExpression;
 import org.apache.carbondata.core.scan.expression.ExpressionResult;
 import org.apache.carbondata.core.scan.expression.exception.FilterIllegalMemberException;
@@ -45,9 +46,9 @@ public class NotEqualsExpressionUnitTest {
 
   @Test public void testEvaluateForNotEqualsExpressionWithBothStringISSame()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression left = new ColumnExpression("left_name", DataType.STRING);
+    ColumnExpression left = new ColumnExpression("left_name", DataTypes.STRING);
     left.setColIndex(0);
-    ColumnExpression right = new ColumnExpression("right_name", DataType.STRING);
+    ColumnExpression right = new ColumnExpression("right_name", DataTypes.STRING);
     right.setColIndex(1);
     notEqualsExpression = new NotEqualsExpression(left, right);
     RowImpl value = new RowImpl();
@@ -77,9 +78,9 @@ public class NotEqualsExpressionUnitTest {
   @Test public void testEvaluateForNotEqualsExpressionWithShortDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
 
-    ColumnExpression left = new ColumnExpression("left_id", DataType.SHORT);
+    ColumnExpression left = new ColumnExpression("left_id", DataTypes.SHORT);
     left.setColIndex(0);
-    ColumnExpression right = new ColumnExpression("right_id", DataType.SHORT);
+    ColumnExpression right = new ColumnExpression("right_id", DataTypes.SHORT);
     right.setColIndex(1);
     notEqualsExpression = new NotEqualsExpression(left, right);
     RowImpl value = new RowImpl();
@@ -111,9 +112,9 @@ public class NotEqualsExpressionUnitTest {
 
   @Test public void testEvaluateForNotEqualsExpressionWithIntDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression right = new ColumnExpression("right_number", DataType.INT);
+    ColumnExpression right = new ColumnExpression("right_number", DataTypes.INT);
     right.setColIndex(1);
-    ColumnExpression left = new ColumnExpression("left_number", DataType.INT);
+    ColumnExpression left = new ColumnExpression("left_number", DataTypes.INT);
     left.setColIndex(0);
     notEqualsExpression = new NotEqualsExpression(left, right);
     RowImpl value = new RowImpl();
@@ -142,9 +143,9 @@ public class NotEqualsExpressionUnitTest {
 
   @Test public void testEvaluateForNotEqualsExpressionWithDoubleDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression right = new ColumnExpression("right_contact", DataType.DOUBLE);
+    ColumnExpression right = new ColumnExpression("right_contact", DataTypes.DOUBLE);
     right.setColIndex(1);
-    ColumnExpression left = new ColumnExpression("left_contact", DataType.DOUBLE);
+    ColumnExpression left = new ColumnExpression("left_contact", DataTypes.DOUBLE);
     left.setColIndex(0);
     notEqualsExpression = new NotEqualsExpression(left, right);
     RowImpl value = new RowImpl();
@@ -173,9 +174,9 @@ public class NotEqualsExpressionUnitTest {
 
   @Test public void testEvaluateForNotEqualsExpressionWithLongDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression right = new ColumnExpression("right_contact", DataType.LONG);
+    ColumnExpression right = new ColumnExpression("right_contact", DataTypes.LONG);
     right.setColIndex(1);
-    ColumnExpression left = new ColumnExpression("left_contact", DataType.LONG);
+    ColumnExpression left = new ColumnExpression("left_contact", DataTypes.LONG);
     left.setColIndex(0);
     notEqualsExpression = new NotEqualsExpression(left, right);
     RowImpl value = new RowImpl();
@@ -204,9 +205,9 @@ public class NotEqualsExpressionUnitTest {
   @Test public void testEvaluateForNotEqualsExpressionWithTimestampDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
     try {
-      ColumnExpression left = new ColumnExpression("left_timestamp", DataType.TIMESTAMP);
+      ColumnExpression left = new ColumnExpression("left_timestamp", DataTypes.TIMESTAMP);
       left.setColIndex(0);
-      ColumnExpression right = new ColumnExpression("right_timestamp", DataType.TIMESTAMP);
+      ColumnExpression right = new ColumnExpression("right_timestamp", DataTypes.TIMESTAMP);
       right.setColIndex(1);
 
       notEqualsExpression = new NotEqualsExpression(left, right);
@@ -248,7 +249,7 @@ public class NotEqualsExpressionUnitTest {
 
   @Test(expected = FilterUnsupportedException.class) public void testForNotEqualsExpressionWithDefaultCase()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression right = new ColumnExpression("contact", DataType.BOOLEAN);
+    ColumnExpression right = new ColumnExpression("contact", DataTypes.BOOLEAN);
     right.setColIndex(0);
     notEqualsExpression = new NotEqualsExpression(right, right);
     RowImpl value = new RowImpl();
@@ -260,9 +261,9 @@ public class NotEqualsExpressionUnitTest {
 
   @Test public void testEvaluateWithForNotEqualsExpressionDecimalDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression right = new ColumnExpression("contact", DataType.DECIMAL);
+    ColumnExpression right = new ColumnExpression("contact", DataTypes.DECIMAL);
     right.setColIndex(1);
-    ColumnExpression left = new ColumnExpression("contact", DataType.DECIMAL);
+    ColumnExpression left = new ColumnExpression("contact", DataTypes.DECIMAL);
     left.setColIndex(0);
     notEqualsExpression = new NotEqualsExpression(left, right);
     RowImpl value = new RowImpl();
@@ -290,7 +291,7 @@ public class NotEqualsExpressionUnitTest {
 
   @Test public void testEvaluateForNotEqualsExpressionWithIsNullReturnTrue()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression right = new ColumnExpression("id", DataType.SHORT);
+    ColumnExpression right = new ColumnExpression("id", DataTypes.SHORT);
     right.setColIndex(0);
     notEqualsExpression = new NotEqualsExpression(right, right);
     RowImpl value = new RowImpl();
@@ -317,9 +318,9 @@ public class NotEqualsExpressionUnitTest {
 
   @Test public void testEvaluateForNotEqualsExpressionWithLeftAndRightDifferentDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression left = new ColumnExpression("name", DataType.STRING);
+    ColumnExpression left = new ColumnExpression("name", DataTypes.STRING);
     left.setColIndex(0);
-    ColumnExpression right = new ColumnExpression("number", DataType.INT);
+    ColumnExpression right = new ColumnExpression("number", DataTypes.INT);
     right.setColIndex(1);
     notEqualsExpression = new NotEqualsExpression(left, right);
     RowImpl value = new RowImpl();
@@ -346,8 +347,8 @@ public class NotEqualsExpressionUnitTest {
   }
 
   @Test public void testForNotEqualsExpressionWithGetString() throws Exception {
-    ColumnExpression right = new ColumnExpression("right_name", DataType.STRING);
-    ColumnExpression left = new ColumnExpression("left_name", DataType.STRING);
+    ColumnExpression right = new ColumnExpression("right_name", DataTypes.STRING);
+    ColumnExpression left = new ColumnExpression("left_name", DataTypes.STRING);
     notEqualsExpression = new NotEqualsExpression(left, right);
     String expected_result = "NotEquals(ColumnExpression(left_name),ColumnExpression(right_name))";
     String result = notEqualsExpression.getString();
@@ -356,7 +357,7 @@ public class NotEqualsExpressionUnitTest {
 
   @Test public void testEvaluateForNotEqualsExpressionWithNullWhileCreatingObject()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression right = new ColumnExpression("id", DataType.SHORT);
+    ColumnExpression right = new ColumnExpression("id", DataTypes.SHORT);
     right.setColIndex(0);
     notEqualsExpression = new NotEqualsExpression(right, right, false);
     RowImpl value = new RowImpl();
@@ -377,13 +378,13 @@ public class NotEqualsExpressionUnitTest {
     };
 
     ExpressionResult result = notEqualsExpression.evaluate(value);
-    assertEquals(DataType.BOOLEAN, result.getDataType());
+    assertEquals(DataTypes.BOOLEAN, result.getDataType());
 
   }
 
   @Test public void testEvaluateForNotEqualsExpressionWithNullISTureWhileCreatingObject()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression right = new ColumnExpression("id", DataType.SHORT);
+    ColumnExpression right = new ColumnExpression("id", DataTypes.SHORT);
     right.setColIndex(0);
     notEqualsExpression = new NotEqualsExpression(right, right, true);
     RowImpl value = new RowImpl();
@@ -398,7 +399,7 @@ public class NotEqualsExpressionUnitTest {
     };
 
     ExpressionResult result = notEqualsExpression.evaluate(value);
-    assertEquals(DataType.BOOLEAN, result.getDataType());
+    assertEquals(DataTypes.BOOLEAN, result.getDataType());
 
   }
 }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpressionUnitTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpressionUnitTest.java b/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpressionUnitTest.java
index cb8bb00..230e305 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpressionUnitTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/NotInExpressionUnitTest.java
@@ -24,6 +24,7 @@ import java.text.SimpleDateFormat;
 import java.util.Date;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.scan.expression.ColumnExpression;
 import org.apache.carbondata.core.scan.expression.ExpressionResult;
 import org.apache.carbondata.core.scan.expression.exception.FilterIllegalMemberException;
@@ -44,9 +45,9 @@ public class NotInExpressionUnitTest {
 
   @Test public void testEvaluateForNotInExpressionWithString()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression left = new ColumnExpression("left_name", DataType.STRING);
+    ColumnExpression left = new ColumnExpression("left_name", DataTypes.STRING);
     left.setColIndex(0);
-    ColumnExpression right = new ColumnExpression("right_name", DataType.STRING);
+    ColumnExpression right = new ColumnExpression("right_name", DataTypes.STRING);
     right.setColIndex(1);
     notInExpression = new NotInExpression(left, right);
     RowImpl value = new RowImpl();
@@ -57,7 +58,7 @@ public class NotInExpressionUnitTest {
     new MockUp<ExpressionResult>() {
 
       @Mock public DataType getDataType() {
-        return DataType.STRING;
+        return DataTypes.STRING;
       }
 
       @Mock public String getString() {
@@ -73,9 +74,9 @@ public class NotInExpressionUnitTest {
   @Test public void testEvaluateForNotInExpressionWithShortDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
 
-    ColumnExpression left = new ColumnExpression("left_id", DataType.SHORT);
+    ColumnExpression left = new ColumnExpression("left_id", DataTypes.SHORT);
     left.setColIndex(0);
-    ColumnExpression right = new ColumnExpression("right_id", DataType.SHORT);
+    ColumnExpression right = new ColumnExpression("right_id", DataTypes.SHORT);
     right.setColIndex(1);
     notInExpression = new NotInExpression(left, right);
     RowImpl value = new RowImpl();
@@ -91,16 +92,16 @@ public class NotInExpressionUnitTest {
     };
 
     ExpressionResult result = notInExpression.evaluate(value);
-    assertEquals(result.getDataType(), DataType.BOOLEAN);
+    assertEquals(result.getDataType(), DataTypes.BOOLEAN);
 
   }
 
   @Test public void testEvaluateForNotInExpressionWithIntDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
 
-    ColumnExpression left = new ColumnExpression("left_id", DataType.INT);
+    ColumnExpression left = new ColumnExpression("left_id", DataTypes.INT);
     left.setColIndex(0);
-    ColumnExpression right = new ColumnExpression("right_id", DataType.INT);
+    ColumnExpression right = new ColumnExpression("right_id", DataTypes.INT);
     right.setColIndex(1);
     notInExpression = new NotInExpression(left, right);
     RowImpl value = new RowImpl();
@@ -116,15 +117,15 @@ public class NotInExpressionUnitTest {
     };
 
     ExpressionResult result = notInExpression.evaluate(value);
-    assertEquals(result.getDataType(), DataType.BOOLEAN);
+    assertEquals(result.getDataType(), DataTypes.BOOLEAN);
 
   }
 
   @Test public void testEvaluateForNotInExpressionWithDoubleDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression left = new ColumnExpression("left_contact", DataType.DOUBLE);
+    ColumnExpression left = new ColumnExpression("left_contact", DataTypes.DOUBLE);
     left.setColIndex(0);
-    ColumnExpression right = new ColumnExpression("right_contact", DataType.DOUBLE);
+    ColumnExpression right = new ColumnExpression("right_contact", DataTypes.DOUBLE);
     right.setColIndex(1);
     notInExpression = new NotInExpression(left, right);
     RowImpl value = new RowImpl();
@@ -145,9 +146,9 @@ public class NotInExpressionUnitTest {
 
   @Test public void testEvaluateForNotInExpressionWithLongDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression left = new ColumnExpression("left_contact", DataType.LONG);
+    ColumnExpression left = new ColumnExpression("left_contact", DataTypes.LONG);
     left.setColIndex(0);
-    ColumnExpression right = new ColumnExpression("right_contact", DataType.LONG);
+    ColumnExpression right = new ColumnExpression("right_contact", DataTypes.LONG);
     right.setColIndex(1);
     notInExpression = new NotInExpression(left, right);
     RowImpl value = new RowImpl();
@@ -169,9 +170,9 @@ public class NotInExpressionUnitTest {
   @Test public void testEvaluateForNotInExpressionWithTimestampDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
     try {
-      ColumnExpression left = new ColumnExpression("left_timestamp", DataType.TIMESTAMP);
+      ColumnExpression left = new ColumnExpression("left_timestamp", DataTypes.TIMESTAMP);
       left.setColIndex(0);
-      ColumnExpression right = new ColumnExpression("right_timestamp", DataType.TIMESTAMP);
+      ColumnExpression right = new ColumnExpression("right_timestamp", DataTypes.TIMESTAMP);
       right.setColIndex(1);
       notInExpression = new NotInExpression(right, right);
 
@@ -201,9 +202,9 @@ public class NotInExpressionUnitTest {
 
   @Test public void testEvaluateForNotInExpressionWithDecimalDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression left = new ColumnExpression("left_contact", DataType.DECIMAL);
+    ColumnExpression left = new ColumnExpression("left_contact", DataTypes.DECIMAL);
     left.setColIndex(0);
-    ColumnExpression right = new ColumnExpression("right_contact", DataType.DECIMAL);
+    ColumnExpression right = new ColumnExpression("right_contact", DataTypes.DECIMAL);
     right.setColIndex(1);
     notInExpression = new NotInExpression(left, right);
     RowImpl value = new RowImpl();
@@ -224,9 +225,9 @@ public class NotInExpressionUnitTest {
 
   @Test(expected = FilterUnsupportedException.class) public void testDefaultCaseForNotInExpression()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression left = new ColumnExpression("contact", DataType.BOOLEAN);
+    ColumnExpression left = new ColumnExpression("contact", DataTypes.BOOLEAN);
     left.setColIndex(0);
-    ColumnExpression right = new ColumnExpression("contact", DataType.BOOLEAN);
+    ColumnExpression right = new ColumnExpression("contact", DataTypes.BOOLEAN);
     right.setColIndex(1);
     notInExpression = new NotInExpression(left, right);
     RowImpl value = new RowImpl();
@@ -238,9 +239,9 @@ public class NotInExpressionUnitTest {
   }
 
   @Test public void testForNotInExpressionWithGetString() throws Exception {
-    ColumnExpression left = new ColumnExpression("left_name", DataType.STRING);
+    ColumnExpression left = new ColumnExpression("left_name", DataTypes.STRING);
     left.setColIndex(0);
-    ColumnExpression right = new ColumnExpression("right_name", DataType.STRING);
+    ColumnExpression right = new ColumnExpression("right_name", DataTypes.STRING);
     right.setColIndex(1);
     notInExpression = new NotInExpression(left, right);
     String expected_result = "NOT IN(ColumnExpression(left_name),ColumnExpression(right_name))";
@@ -249,9 +250,9 @@ public class NotInExpressionUnitTest {
   }
   @Test public void testEvaluateForNotInExpressionWithLeftAndRightDifferentDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
-    ColumnExpression right = new ColumnExpression("name", DataType.STRING);
+    ColumnExpression right = new ColumnExpression("name", DataTypes.STRING);
     right.setColIndex(0);
-    ColumnExpression left = new ColumnExpression("number", DataType.INT);
+    ColumnExpression left = new ColumnExpression("number", DataTypes.INT);
     left.setColIndex(1);
     notInExpression = new NotInExpression(left, right);
     RowImpl value = new RowImpl();

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/AndExpressionTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/AndExpressionTest.java b/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/AndExpressionTest.java
index 22213e3..55f4fdf 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/AndExpressionTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/AndExpressionTest.java
@@ -18,6 +18,7 @@
 package org.apache.carbondata.core.scan.expression.logical;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.scan.expression.ColumnExpression;
 import org.apache.carbondata.core.scan.expression.ExpressionResult;
 import org.apache.carbondata.core.scan.expression.exception.FilterIllegalMemberException;
@@ -38,8 +39,8 @@ public class AndExpressionTest {
   private AndExpression andExpression;
 
   @Before public void setUp() {
-    ColumnExpression leftExpression = new ColumnExpression("IMEI", DataType.BOOLEAN);
-    ColumnExpression rightExpression = new ColumnExpression("IMEI", DataType.BOOLEAN);
+    ColumnExpression leftExpression = new ColumnExpression("IMEI", DataTypes.BOOLEAN);
+    ColumnExpression rightExpression = new ColumnExpression("IMEI", DataTypes.BOOLEAN);
     andExpression = new AndExpression(leftExpression, rightExpression);
   }
 
@@ -47,7 +48,7 @@ public class AndExpressionTest {
       throws FilterUnsupportedException, FilterIllegalMemberException {
     RowImpl rowImpl = new RowImpl();
     rowImpl.setValues(new Boolean[] { true });
-    final ExpressionResult expressionResult = new ExpressionResult(DataType.STRING, "test");
+    final ExpressionResult expressionResult = new ExpressionResult(DataTypes.STRING, "test");
     new MockUp<ColumnExpression>() {
       @Mock public ExpressionResult evaluate(RowIntf value)
           throws FilterUnsupportedException, FilterIllegalMemberException {
@@ -60,7 +61,7 @@ public class AndExpressionTest {
   @Test public void testEvaluate() throws FilterUnsupportedException, FilterIllegalMemberException {
     RowImpl rowImpl = new RowImpl();
     rowImpl.setValues(new Boolean[] { false });
-    final ExpressionResult expressionResult = new ExpressionResult(DataType.BOOLEAN, "test");
+    final ExpressionResult expressionResult = new ExpressionResult(DataTypes.BOOLEAN, "test");
     new MockUp<ColumnExpression>() {
       @Mock public ExpressionResult evaluate(RowIntf value)
           throws FilterUnsupportedException, FilterIllegalMemberException {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/FalseExpressionTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/FalseExpressionTest.java b/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/FalseExpressionTest.java
index 57467d9..59bf0b5 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/FalseExpressionTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/FalseExpressionTest.java
@@ -17,7 +17,7 @@
 
 package org.apache.carbondata.core.scan.expression.logical;
 
-import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.scan.expression.ColumnExpression;
 import org.apache.carbondata.core.scan.expression.ExpressionResult;
 import org.apache.carbondata.core.scan.expression.exception.FilterIllegalMemberException;
@@ -33,7 +33,7 @@ public class FalseExpressionTest {
   private FalseExpression falseExpression;
 
   @Before public void setUp() {
-    ColumnExpression columnExpression = new ColumnExpression("IMEI", DataType.BOOLEAN);
+    ColumnExpression columnExpression = new ColumnExpression("IMEI", DataTypes.BOOLEAN);
     falseExpression = new FalseExpression(columnExpression);
   }
 
@@ -41,6 +41,6 @@ public class FalseExpressionTest {
     RowImpl rowImpl = new RowImpl();
     rowImpl.setValues(new Boolean[] { true });
     ExpressionResult actualValue = falseExpression.evaluate(rowImpl);
-    assertEquals(new ExpressionResult(DataType.BOOLEAN, false), actualValue);
+    assertEquals(new ExpressionResult(DataTypes.BOOLEAN, false), actualValue);
   }
 }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/OrExpressionTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/OrExpressionTest.java b/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/OrExpressionTest.java
index b09dee9..6ad4673 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/OrExpressionTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/expression/logical/OrExpressionTest.java
@@ -18,6 +18,7 @@
 package org.apache.carbondata.core.scan.expression.logical;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.scan.expression.ColumnExpression;
 import org.apache.carbondata.core.scan.expression.ExpressionResult;
 import org.apache.carbondata.core.scan.expression.exception.FilterIllegalMemberException;
@@ -37,8 +38,8 @@ public class OrExpressionTest {
   private OrExpression orExpression;
 
   @Before public void setUp() {
-    ColumnExpression leftExpression = new ColumnExpression("IMEI", DataType.BOOLEAN);
-    ColumnExpression rightExpression = new ColumnExpression("IMEI", DataType.BOOLEAN);
+    ColumnExpression leftExpression = new ColumnExpression("IMEI", DataTypes.BOOLEAN);
+    ColumnExpression rightExpression = new ColumnExpression("IMEI", DataTypes.BOOLEAN);
     orExpression = new OrExpression(leftExpression, rightExpression);
   }
 
@@ -51,7 +52,7 @@ public class OrExpressionTest {
   @Test public void testEvaluate() throws FilterIllegalMemberException, FilterUnsupportedException {
     RowImpl rowImpl = new RowImpl();
     rowImpl.setValues(new Boolean[] { false });
-    final ExpressionResult expressionResult = new ExpressionResult(DataType.BOOLEAN, "test");
+    final ExpressionResult expressionResult = new ExpressionResult(DataTypes.BOOLEAN, "test");
     new MockUp<ColumnExpression>() {
       @Mock public ExpressionResult evaluate(RowIntf value) {
         return expressionResult;
@@ -65,7 +66,7 @@ public class OrExpressionTest {
       throws FilterUnsupportedException, FilterIllegalMemberException {
     RowImpl rowImpl = new RowImpl();
     rowImpl.setValues(new Boolean[] { true });
-    final ExpressionResult expressionResult = new ExpressionResult(DataType.STRING, "test");
+    final ExpressionResult expressionResult = new ExpressionResult(DataTypes.STRING, "test");
     new MockUp<ColumnExpression>() {
       @Mock public ExpressionResult evaluate(RowIntf value)
           throws FilterUnsupportedException, FilterIllegalMemberException {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/scan/filter/FilterUtilTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/filter/FilterUtilTest.java b/core/src/test/java/org/apache/carbondata/core/scan/filter/FilterUtilTest.java
index 6667d53..a6f483b 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/filter/FilterUtilTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/filter/FilterUtilTest.java
@@ -26,6 +26,7 @@ import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.datastore.IndexKey;
 import org.apache.carbondata.core.datastore.block.SegmentProperties;
 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.CarbonColumn;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension;
@@ -67,7 +68,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     columnSchema.setColumnar(true);
     columnSchema.setColumnName("IMEI");
     columnSchema.setColumnUniqueId(UUID.randomUUID().toString());
-    columnSchema.setDataType(DataType.STRING);
+    columnSchema.setDataType(DataTypes.STRING);
     columnSchema.setDimensionColumn(true);
   }
 
@@ -80,7 +81,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
 
   @Test
   public void testCheckIfLeftExpressionRequireEvaluationWithExpressionNotInstanceOfColumnExpression() {
-    ColumnExpression expression = new ColumnExpression("test", DataType.STRING);
+    ColumnExpression expression = new ColumnExpression("test", DataTypes.STRING);
     boolean result = FilterUtil.checkIfLeftExpressionRequireEvaluation(expression);
     assertFalse(result);
   }
@@ -103,7 +104,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     String dictionaryVal = "1";
     String memberVal = "1";
     int actualResult =
-        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataType.SHORT);
+        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataTypes.SHORT);
     int expectedResult = 0;
     assertEquals(expectedResult, actualResult);
   }
@@ -112,7 +113,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     String dictionaryVal = "1000";
     String memberVal = "1001";
     int actualResult =
-        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataType.INT);
+        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataTypes.INT);
     int expectedResult = -1;
     assertEquals(expectedResult, actualResult);
   }
@@ -121,7 +122,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     String dictionaryVal = "1.90";
     String memberVal = "1.89";
     int actualResult =
-        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataType.DOUBLE);
+        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataTypes.DOUBLE);
     int expectedResult = 1;
     assertEquals(expectedResult, actualResult);
   }
@@ -130,7 +131,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     String dictionaryVal = "111111111111111";
     String memberVal = "1111111111111111";
     int actualResult =
-        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataType.LONG);
+        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataTypes.LONG);
     int expectedResult = -1;
     assertEquals(expectedResult, actualResult);
   }
@@ -139,7 +140,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     String dictionaryVal = "true";
     String memberVal = "false";
     int actualResult =
-        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataType.BOOLEAN);
+        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataTypes.BOOLEAN);
     int expectedResult = 1;
     assertEquals(expectedResult, actualResult);
   }
@@ -148,7 +149,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     String dictionaryVal = "1111111";
     String memberVal = "1111";
     int actualResult =
-        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataType.DECIMAL);
+        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataTypes.DECIMAL);
     int expectedResult = 1;
     assertEquals(expectedResult, actualResult);
   }
@@ -157,7 +158,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     String dictionaryVal = "11.78";
     String memberVal = "1111.90";
     int actualResult =
-        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataType.FLOAT);
+        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataTypes.FLOAT);
     int expectedResult = -1;
     assertEquals(expectedResult, actualResult);
   }
@@ -166,7 +167,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     String dictionaryVal = "2008-01-01 00:00:01";
     String memberVal = "2008-01-01 00:00:01";
     int actualValue =
-        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataType.TIMESTAMP);
+        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataTypes.TIMESTAMP);
     int expectedValue = 0;
     assertEquals(expectedValue, actualValue);
   }
@@ -175,7 +176,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     String dictionaryVal = "test";
     String memberVal = "1";
     int actualValue =
-        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataType.INT);
+        FilterUtil.compareFilterKeyBasedOnDataType(dictionaryVal, memberVal, DataTypes.INT);
     int expectedValue = -1;
     assertEquals(expectedValue, actualValue);
   }
@@ -194,7 +195,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
 
   @Test public void testCheckIfExpressionContainsColumn() {
     String columnName = "IMEI";
-    Expression expression = new ColumnExpression(columnName, DataType.STRING);
+    Expression expression = new ColumnExpression(columnName, DataTypes.STRING);
     boolean result = FilterUtil.checkIfExpressionContainsColumn(expression);
     assertTrue(result);
   }
@@ -202,7 +203,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
   @Test
   public void testCheckIfExpressionContainsColumnWithExpressionNotInstanceOfColumnExpression() {
     String columnName = "IMEI";
-    Expression expression = new LiteralExpression(columnName, DataType.STRING);
+    Expression expression = new LiteralExpression(columnName, DataTypes.STRING);
     boolean result = FilterUtil.checkIfExpressionContainsColumn(expression);
     assertFalse(result);
   }
@@ -210,7 +211,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
   @Test public void testIsExpressionNeedsToResolved() {
     boolean isIncludeFilter = true;
     Object obj = "test";
-    LiteralExpression literalExpression = new LiteralExpression(obj, DataType.STRING);
+    LiteralExpression literalExpression = new LiteralExpression(obj, DataTypes.STRING);
     boolean result = FilterUtil.isExpressionNeedsToResolved(literalExpression, isIncludeFilter);
     assertFalse(result);
   }
@@ -218,7 +219,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
   @Test public void testIsExpressionNeedsToResolvedWithDataTypeNullAndIsIncludeFilterFalse() {
     boolean isIncludeFilter = false;
     Object obj = "test";
-    LiteralExpression literalExpression = new LiteralExpression(obj, DataType.NULL);
+    LiteralExpression literalExpression = new LiteralExpression(obj, DataTypes.NULL);
     boolean result = FilterUtil.isExpressionNeedsToResolved(literalExpression, isIncludeFilter);
     assertTrue(result);
   }
@@ -236,7 +237,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     columnSchema.setColumnar(true);
     columnSchema.setColumnName("IMEI");
     columnSchema.setColumnUniqueId(UUID.randomUUID().toString());
-    columnSchema.setDataType(DataType.STRING);
+    columnSchema.setDataType(DataTypes.STRING);
     columnSchema.setDimensionColumn(true);
     CarbonDimension carbonDimension =
         new CarbonDimension(columnSchema, ordinal, keyOrdinal, columnGroupOrdinal,
@@ -248,8 +249,8 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
   }
 
   @Test public void testGetFilterListForAllMembersRS() throws Exception {
-    Expression expression = new ColumnExpression("IMEI", DataType.STRING);
-    ColumnExpression columnExpression = new ColumnExpression("IMEI", DataType.STRING);
+    Expression expression = new ColumnExpression("IMEI", DataTypes.STRING);
+    ColumnExpression columnExpression = new ColumnExpression("IMEI", DataTypes.STRING);
     String defaultValues = "test";
     int defaultSurrogate = 1;
     boolean isIncludeFilter = true;
@@ -258,7 +259,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     final CarbonColumn carbonColumn = new CarbonColumn(dimColumn, ordinal, -1);
     new MockUp<ColumnExpression>() {
@@ -279,8 +280,8 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
 
   @Test public void testGetFilterListForAllMembersRSWithDefaultValuesEqualsToNull()
       throws Exception {
-    Expression expression = new ColumnExpression("IMEI", DataType.STRING);
-    ColumnExpression columnExpression = new ColumnExpression("IMEI", DataType.STRING);
+    Expression expression = new ColumnExpression("IMEI", DataTypes.STRING);
+    ColumnExpression columnExpression = new ColumnExpression("IMEI", DataTypes.STRING);
     String defaultValues = CarbonCommonConstants.MEMBER_DEFAULT_VAL;
     int defaultSurrogate = 1;
     boolean isIncludeFilter = true;
@@ -289,7 +290,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
-    dimColumn.setDataType(DataType.STRING);
+    dimColumn.setDataType(DataTypes.STRING);
     dimColumn.setDimensionColumn(true);
     final CarbonColumn carbonColumn = new CarbonColumn(dimColumn, ordinal, -1);
     new MockUp<ColumnExpression>() {
@@ -309,8 +310,8 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
   }
 
   @Test public void testgetFilterListForRS() throws Exception {
-    Expression expression = new ColumnExpression("IMEI", DataType.STRING);
-    ColumnExpression columnExpression = new ColumnExpression("IMEI", DataType.STRING);
+    Expression expression = new ColumnExpression("IMEI", DataTypes.STRING);
+    ColumnExpression columnExpression = new ColumnExpression("IMEI", DataTypes.STRING);
     String defaultValues = CarbonCommonConstants.MEMBER_DEFAULT_VAL;
     int defaultSurrogate = 1;
     int ordinal = 1;
@@ -331,7 +332,7 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
   }
 
   @Test public void testCheckIfDataTypeNotTimeStamp() {
-    Expression expression = new ColumnExpression("test", DataType.STRING);
+    Expression expression = new ColumnExpression("test", DataTypes.STRING);
     boolean result = FilterUtil.checkIfDataTypeNotTimeStamp(expression);
     assertFalse(result);
   }
@@ -352,14 +353,14 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
   }
 
   @Test public void testCheckIfRightExpressionRequireEvaluation() {
-    Expression expression = new ColumnExpression("test", DataType.STRING);
+    Expression expression = new ColumnExpression("test", DataTypes.STRING);
     boolean result = FilterUtil.checkIfRightExpressionRequireEvaluation(expression);
     assertTrue(result);
   }
 
   @Test
   public void testCheckIfRightExpressionRequireEvaluationWithExpressionIsInstanceOfLiteralExpression() {
-    Expression expression = new LiteralExpression("test", DataType.STRING);
+    Expression expression = new LiteralExpression("test", DataTypes.STRING);
     boolean result = FilterUtil.checkIfRightExpressionRequireEvaluation(expression);
     assertFalse(result);
   }
@@ -368,13 +369,13 @@ public class FilterUtilTest extends AbstractDictionaryCacheTest {
     boolean isIncludeFilter = true;
     AbsoluteTableIdentifier absoluteTableIdentifier =
         new AbsoluteTableIdentifier(this.carbonStorePath, carbonTableIdentifier);
-    ColumnExpression expression = new ColumnExpression("test", DataType.STRING);
+    ColumnExpression expression = new ColumnExpression("test", DataTypes.STRING);
     List<String> evaluateResultListFinal = new ArrayList<>();
     evaluateResultListFinal.add("test1");
     evaluateResultListFinal.add("test2");
     assertTrue(FilterUtil
         .getNoDictionaryValKeyMemberForFilter(evaluateResultListFinal, isIncludeFilter,
-            DataType.STRING) instanceof ColumnFilterInfo);
+            DataTypes.STRING) instanceof ColumnFilterInfo);
   }
 
   @Test public void testPrepareDefaultStartIndexKey() throws KeyGenException {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/util/CarbonMetadataUtilTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/util/CarbonMetadataUtilTest.java b/core/src/test/java/org/apache/carbondata/core/util/CarbonMetadataUtilTest.java
index d4bd06b..ca78e66 100644
--- a/core/src/test/java/org/apache/carbondata/core/util/CarbonMetadataUtilTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/util/CarbonMetadataUtilTest.java
@@ -189,7 +189,7 @@ public class CarbonMetadataUtilTest {
 
     final EncodedColumnPage measure = new EncodedColumnPage(new DataChunk2(), new byte[]{0,1},
         PrimitivePageStatsCollector.newInstance(
-        org.apache.carbondata.core.metadata.datatype.DataType.BYTE, 0, 0));
+        org.apache.carbondata.core.metadata.datatype.DataTypes.BYTE, 0, 0));
     new MockUp<EncodedTablePage>() {
       @SuppressWarnings("unused") @Mock
       public EncodedColumnPage getMeasure(int measureIndex) {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/util/CarbonUtilTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/util/CarbonUtilTest.java b/core/src/test/java/org/apache/carbondata/core/util/CarbonUtilTest.java
index 4a8483f..658dda9 100644
--- a/core/src/test/java/org/apache/carbondata/core/util/CarbonUtilTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/util/CarbonUtilTest.java
@@ -39,6 +39,7 @@ import org.apache.carbondata.core.metadata.ValueEncoderMeta;
 import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;
 import org.apache.carbondata.core.metadata.blocklet.datachunk.DataChunk;
 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.CarbonMeasure;
@@ -507,14 +508,14 @@ public class CarbonUtilTest {
   }
 
   @Test public void testForHasDataTypes() {
-    DataType[] dataTypes = { DataType.DECIMAL, DataType.BOOLEAN, DataType.INT };
-    assertTrue(CarbonUtil.hasDataType(DataType.BOOLEAN, dataTypes));
-    assertTrue(!CarbonUtil.hasDataType(DataType.DATE, dataTypes));
+    DataType[] dataTypes = { DataTypes.DECIMAL, DataTypes.BOOLEAN, DataTypes.INT };
+    assertTrue(CarbonUtil.hasDataType(DataTypes.BOOLEAN, dataTypes));
+    assertTrue(!CarbonUtil.hasDataType(DataTypes.DATE, dataTypes));
   }
 
   @Test public void testForHasComplexDataTypes() {
-    assertTrue(CarbonUtil.hasComplexDataType(DataType.ARRAY));
-    assertTrue(!CarbonUtil.hasComplexDataType(DataType.DATE));
+    assertTrue(DataTypes.ARRAY.isComplexType());
+    assertTrue(!DataTypes.DATE.isComplexType());
   }
 
   @Test public void testToGetDictionaryEncodingArray() {
@@ -575,11 +576,11 @@ public class CarbonUtilTest {
     ColumnSchema column1Schema = new ColumnSchema();
     ColumnSchema column2Schema = new ColumnSchema();
     column1Schema.setColumnName("Column1");
-    column1Schema.setDataType(DataType.DATE);
+    column1Schema.setDataType(DataTypes.DATE);
     column1.setDimension(new CarbonDimension(column1Schema, 1, 1, 1, 1));
 
     column2Schema.setColumnName("Column2");
-    column2Schema.setDataType(DataType.ARRAY);
+    column2Schema.setDataType(DataTypes.ARRAY);
     column2.setDimension(new CarbonDimension(column2Schema, 1, 1, 1, 1));
 
     QueryDimension[] queryDimensions = { column1, column2 };

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/util/DataFileFooterConverterTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/util/DataFileFooterConverterTest.java b/core/src/test/java/org/apache/carbondata/core/util/DataFileFooterConverterTest.java
index 8161fae..30b3247 100644
--- a/core/src/test/java/org/apache/carbondata/core/util/DataFileFooterConverterTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/util/DataFileFooterConverterTest.java
@@ -17,32 +17,39 @@
 
 package org.apache.carbondata.core.util;
 
-import mockit.Mock;
-import mockit.MockUp;
+import java.io.ByteArrayInputStream;
+import java.io.DataInputStream;
+import java.io.IOException;
+import java.nio.ByteBuffer;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
 
-import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
-import org.apache.carbondata.core.datastore.block.TableBlockInfo;
-import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;
-import org.apache.carbondata.core.metadata.blocklet.SegmentInfo;
 import org.apache.carbondata.core.datastore.FileHolder;
+import org.apache.carbondata.core.datastore.block.TableBlockInfo;
 import org.apache.carbondata.core.datastore.impl.FileFactory;
 import org.apache.carbondata.core.datastore.impl.FileHolderImpl;
+import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
+import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;
+import org.apache.carbondata.core.metadata.blocklet.SegmentInfo;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.reader.CarbonFooterReader;
 import org.apache.carbondata.core.reader.CarbonIndexFileReader;
 import org.apache.carbondata.core.reader.ThriftReader;
-import org.apache.carbondata.format.*;
+import org.apache.carbondata.format.BlockIndex;
+import org.apache.carbondata.format.BlockletBTreeIndex;
+import org.apache.carbondata.format.BlockletMinMaxIndex;
 import org.apache.carbondata.format.ColumnSchema;
+import org.apache.carbondata.format.DataType;
+import org.apache.carbondata.format.Encoding;
+import org.apache.carbondata.format.FileFooter;
+import org.apache.carbondata.format.IndexHeader;
 
+import mockit.Mock;
+import mockit.MockUp;
 import org.junit.Test;
 
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.List;
-
-import java.io.*;
-import java.util.*;
-
-import static junit.framework.TestCase.*;
+import static junit.framework.TestCase.assertEquals;
 
 public class DataFileFooterConverterTest {
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/util/DataTypeUtilTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/util/DataTypeUtilTest.java b/core/src/test/java/org/apache/carbondata/core/util/DataTypeUtilTest.java
index a02bc10..b6ea765 100644
--- a/core/src/test/java/org/apache/carbondata/core/util/DataTypeUtilTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/util/DataTypeUtilTest.java
@@ -17,23 +17,29 @@
 
 package org.apache.carbondata.core.util;
 
-import org.apache.carbondata.core.metadata.datatype.DataType;
+import java.math.BigDecimal;
+import java.math.BigInteger;
+
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonMeasure;
 import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
 
 import org.junit.Test;
 
-import java.math.BigDecimal;
-import java.math.BigInteger;
-
-import static org.apache.carbondata.core.util.DataTypeUtil.*;
-import static junit.framework.TestCase.*;
+import static junit.framework.TestCase.assertEquals;
+import static junit.framework.TestCase.assertTrue;
+import static org.apache.carbondata.core.util.DataTypeUtil.bigDecimalToByte;
+import static org.apache.carbondata.core.util.DataTypeUtil.byteToBigDecimal;
+import static org.apache.carbondata.core.util.DataTypeUtil.getColumnDataTypeDisplayName;
 import static org.apache.carbondata.core.util.DataTypeUtil.getDataBasedOnDataType;
+import static org.apache.carbondata.core.util.DataTypeUtil.getDataType;
+import static org.apache.carbondata.core.util.DataTypeUtil.getMeasureValueBasedOnDataType;
+import static org.apache.carbondata.core.util.DataTypeUtil.normalizeIntAndLongValues;
 
 public class DataTypeUtilTest {
 
   @Test public void testGetColumnDataTypeDisplayName() {
-    String expected = DataType.INT.getName();
+    String expected = DataTypes.INT.getName();
     String result = getColumnDataTypeDisplayName("INT");
     assertEquals(expected, result);
 
@@ -55,57 +61,57 @@ public class DataTypeUtilTest {
   }
 
   @Test public void testGetDataType() {
-    assertEquals(DataType.TIMESTAMP, getDataType("TIMESTAMP"));
-    assertEquals(DataType.DATE, getDataType("DATE"));
-    assertEquals(DataType.STRING, getDataType("STRING"));
-    assertEquals(DataType.INT, getDataType("INT"));
-    assertEquals(DataType.SHORT, getDataType("SMALLINT"));
-    assertEquals(DataType.LONG, getDataType("LONG"));
-    assertEquals(DataType.DOUBLE, getDataType("DOUBLE"));
-    assertEquals(DataType.DECIMAL, getDataType("DECIMAL"));
-    assertEquals(DataType.ARRAY, getDataType("ARRAY"));
-    assertEquals(DataType.STRUCT, getDataType("STRUCT"));
-    assertEquals(DataType.STRING, getDataType("MAP"));
-    assertEquals(DataType.STRING, getDataType("default"));
+    assertEquals(DataTypes.TIMESTAMP, getDataType("TIMESTAMP"));
+    assertEquals(DataTypes.DATE, getDataType("DATE"));
+    assertEquals(DataTypes.STRING, getDataType("STRING"));
+    assertEquals(DataTypes.INT, getDataType("INT"));
+    assertEquals(DataTypes.SHORT, getDataType("SMALLINT"));
+    assertEquals(DataTypes.LONG, getDataType("LONG"));
+    assertEquals(DataTypes.DOUBLE, getDataType("DOUBLE"));
+    assertEquals(DataTypes.DECIMAL, getDataType("DECIMAL"));
+    assertEquals(DataTypes.ARRAY, getDataType("ARRAY"));
+    assertEquals(DataTypes.STRUCT, getDataType("STRUCT"));
+    assertEquals(DataTypes.STRING, getDataType("MAP"));
+    assertEquals(DataTypes.STRING, getDataType("default"));
 
   }
 
   @Test public void testGetDataBasedOnDataType() throws NumberFormatException {
     String data = " ";
     if (data.isEmpty()) {
-      assertEquals(getDataBasedOnDataType(data, DataType.INT), null);
+      assertEquals(getDataBasedOnDataType(data, DataTypes.INT), null);
     }
-    assertEquals(getDataBasedOnDataType("1", DataType.INT), 1);
-    assertEquals(getDataBasedOnDataType(" ", DataType.INT), null);
-    assertEquals(getDataBasedOnDataType("0", DataType.DOUBLE), 0.0d);
-    assertEquals(getDataBasedOnDataType("0", DataType.LONG), 0L);
+    assertEquals(getDataBasedOnDataType("1", DataTypes.INT), 1);
+    assertEquals(getDataBasedOnDataType(" ", DataTypes.INT), null);
+    assertEquals(getDataBasedOnDataType("0", DataTypes.DOUBLE), 0.0d);
+    assertEquals(getDataBasedOnDataType("0", DataTypes.LONG), 0L);
     java.math.BigDecimal javaDecVal = new java.math.BigDecimal(1);
     scala.math.BigDecimal scalaDecVal = new scala.math.BigDecimal(javaDecVal);
-    assertEquals(getDataBasedOnDataType("1", DataType.DECIMAL),
+    assertEquals(getDataBasedOnDataType("1", DataTypes.DECIMAL),
         DataTypeUtil.getDataTypeConverter().convertToDecimal(scalaDecVal));
-    assertEquals(getDataBasedOnDataType("default", DataType.NULL),
+    assertEquals(getDataBasedOnDataType("default", DataTypes.NULL),
         DataTypeUtil.getDataTypeConverter().convertFromStringToUTF8String("default"));
-    assertEquals(getDataBasedOnDataType((String) null, DataType.NULL), null);
+    assertEquals(getDataBasedOnDataType((String) null, DataTypes.NULL), null);
   }
 
   @Test public void testGetMeasureValueBasedOnDataType() {
     ColumnSchema columnSchema = new ColumnSchema();
     CarbonMeasure carbonMeasure = new CarbonMeasure(columnSchema, 1);
-    Object resultInt = getMeasureValueBasedOnDataType("1", DataType.INT, carbonMeasure);
+    Object resultInt = getMeasureValueBasedOnDataType("1", DataTypes.INT, carbonMeasure);
     Object expectedInt = Double.valueOf(1).intValue();
     assertEquals(expectedInt, resultInt);
-    Object resultLong = getMeasureValueBasedOnDataType("1", DataType.LONG, carbonMeasure);
+    Object resultLong = getMeasureValueBasedOnDataType("1", DataTypes.LONG, carbonMeasure);
     Object expectedLong = Long.valueOf(1);
     assertEquals(expectedLong, resultLong);
-    Object resultDefault = getMeasureValueBasedOnDataType("1", DataType.DOUBLE, carbonMeasure);
+    Object resultDefault = getMeasureValueBasedOnDataType("1", DataTypes.DOUBLE, carbonMeasure);
     Double expectedDefault = Double.valueOf(1);
     assertEquals(expectedDefault, resultDefault);
 
   }
 
   @Test public void testNormalizeIntAndLongValues() throws NumberFormatException {
-    assertEquals(null, normalizeIntAndLongValues("INT", DataType.INT));
-    assertEquals("1", normalizeIntAndLongValues("1", DataType.STRING));
+    assertEquals(null, normalizeIntAndLongValues("INT", DataTypes.INT));
+    assertEquals("1", normalizeIntAndLongValues("1", DataTypes.STRING));
 
   }
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/util/RangeFilterProcessorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/util/RangeFilterProcessorTest.java b/core/src/test/java/org/apache/carbondata/core/util/RangeFilterProcessorTest.java
index 952b7f7..3cee633 100644
--- a/core/src/test/java/org/apache/carbondata/core/util/RangeFilterProcessorTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/util/RangeFilterProcessorTest.java
@@ -20,6 +20,7 @@ package org.apache.carbondata.core.util;
 import java.util.Arrays;
 
 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;
@@ -74,7 +75,7 @@ public class RangeFilterProcessorTest {
 
     Expression inputFilter;
     boolean result = false;
-    ColumnExpression cola = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression cola = new ColumnExpression("a", DataTypes.STRING);
     cola.setDimension(true);
 
     ColumnSchema empColumnSchema = new ColumnSchema();
@@ -82,25 +83,25 @@ public class RangeFilterProcessorTest {
     empColumnSchema.setColumnUniqueId("empNameCol");
     empColumnSchema.setDimensionColumn(true);
     empColumnSchema.setEncodingList(Arrays.asList(Encoding.DICTIONARY));
-    empColumnSchema.setDataType(DataType.STRING);
+    empColumnSchema.setDataType(DataTypes.STRING);
     CarbonDimension empDimension = new CarbonDimension(empColumnSchema, 0, 0, 0, 0, 0);
     cola.setDimension(empDimension);
 
     Expression greaterThan =
-        new GreaterThanEqualToExpression(cola, new LiteralExpression("11", DataType.STRING));
+        new GreaterThanEqualToExpression(cola, new LiteralExpression("11", DataTypes.STRING));
 
-    ColumnExpression colb = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression colb = new ColumnExpression("a", DataTypes.STRING);
     colb.setDimension(true);
     colb.setDimension(empDimension);
     Expression lessThan =
-        new LessThanEqualToExpression(colb, new LiteralExpression("20", DataType.STRING));
+        new LessThanEqualToExpression(colb, new LiteralExpression("20", DataTypes.STRING));
     inputFilter = new AndExpression(greaterThan, lessThan);
 
     Expression output = new AndExpression(new RangeExpression(
-        new GreaterThanEqualToExpression(new ColumnExpression("a", DataType.STRING),
-            new LiteralExpression("11", DataType.STRING)),
-        new LessThanEqualToExpression(new ColumnExpression("a", DataType.STRING),
-            new LiteralExpression("20", DataType.STRING))), new TrueExpression(null));
+        new GreaterThanEqualToExpression(new ColumnExpression("a", DataTypes.STRING),
+            new LiteralExpression("11", DataTypes.STRING)),
+        new LessThanEqualToExpression(new ColumnExpression("a", DataTypes.STRING),
+            new LiteralExpression("20", DataTypes.STRING))), new TrueExpression(null));
     FilterOptimizer rangeFilterOptimizer =
         new RangeFilterOptmizer(new FilterOptimizerBasic(), inputFilter);
     rangeFilterOptimizer.optimizeFilter();
@@ -115,7 +116,7 @@ public class RangeFilterProcessorTest {
 
     Expression inputFilter;
     boolean result = false;
-    ColumnExpression cola = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression cola = new ColumnExpression("a", DataTypes.STRING);
     cola.setDimension(true);
 
     ColumnSchema empColumnSchema = new ColumnSchema();
@@ -123,25 +124,25 @@ public class RangeFilterProcessorTest {
     empColumnSchema.setColumnUniqueId("empNameCol");
     empColumnSchema.setDimensionColumn(true);
     empColumnSchema.setEncodingList(Arrays.asList(Encoding.DICTIONARY));
-    empColumnSchema.setDataType(DataType.STRING);
+    empColumnSchema.setDataType(DataTypes.STRING);
     CarbonDimension empDimension = new CarbonDimension(empColumnSchema, 0, 0, 0, 0, 0);
     cola.setDimension(empDimension);
 
     Expression greaterThan =
-        new GreaterThanEqualToExpression(cola, new LiteralExpression("20", DataType.STRING));
+        new GreaterThanEqualToExpression(cola, new LiteralExpression("20", DataTypes.STRING));
 
-    ColumnExpression colb = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression colb = new ColumnExpression("a", DataTypes.STRING);
     colb.setDimension(true);
     colb.setDimension(empDimension);
     Expression lessThan =
-        new LessThanEqualToExpression(colb, new LiteralExpression("05", DataType.STRING));
+        new LessThanEqualToExpression(colb, new LiteralExpression("05", DataTypes.STRING));
     inputFilter = new AndExpression(greaterThan, lessThan);
 
     Expression output = new AndExpression(
-        new GreaterThanEqualToExpression(new ColumnExpression("a", DataType.STRING),
-            new LiteralExpression("20", DataType.STRING)),
-        new LessThanEqualToExpression(new ColumnExpression("a", DataType.STRING),
-            new LiteralExpression("05", DataType.STRING)));
+        new GreaterThanEqualToExpression(new ColumnExpression("a", DataTypes.STRING),
+            new LiteralExpression("20", DataTypes.STRING)),
+        new LessThanEqualToExpression(new ColumnExpression("a", DataTypes.STRING),
+            new LiteralExpression("05", DataTypes.STRING)));
     FilterOptimizer rangeFilterOptimizer =
         new RangeFilterOptmizer(new FilterOptimizerBasic(), inputFilter);
     rangeFilterOptimizer.optimizeFilter();
@@ -162,33 +163,33 @@ public class RangeFilterProcessorTest {
     empColumnSchema.setColumnUniqueId("a");
     empColumnSchema.setDimensionColumn(true);
     empColumnSchema.setEncodingList(Arrays.asList(Encoding.DICTIONARY));
-    empColumnSchema.setDataType(DataType.STRING);
+    empColumnSchema.setDataType(DataTypes.STRING);
     CarbonDimension empDimension = new CarbonDimension(empColumnSchema, 0, 0, 0, 0, 0);
 
-    ColumnExpression cola1 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression cola1 = new ColumnExpression("a", DataTypes.STRING);
     cola1.setDimension(true);
     cola1.setDimension(empDimension);
 
-    ColumnExpression cola2 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression cola2 = new ColumnExpression("a", DataTypes.STRING);
     cola2.setDimension(true);
     cola2.setDimension(empDimension);
 
-    ColumnExpression cola3 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression cola3 = new ColumnExpression("a", DataTypes.STRING);
     cola3.setDimension(true);
     cola3.setDimension(empDimension);
 
-    ColumnExpression cola4 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression cola4 = new ColumnExpression("a", DataTypes.STRING);
     cola4.setDimension(true);
     cola4.setDimension(empDimension);
 
     Expression lessThan1 =
-        new LessThanEqualToExpression(cola1, new LiteralExpression("15", DataType.STRING));
+        new LessThanEqualToExpression(cola1, new LiteralExpression("15", DataTypes.STRING));
     Expression lessThan2 =
-        new LessThanEqualToExpression(cola2, new LiteralExpression("20", DataType.STRING));
+        new LessThanEqualToExpression(cola2, new LiteralExpression("20", DataTypes.STRING));
     Expression greaterThan1 =
-        new GreaterThanExpression(cola3, new LiteralExpression("12", DataType.STRING));
+        new GreaterThanExpression(cola3, new LiteralExpression("12", DataTypes.STRING));
     Expression greaterThan2 =
-        new GreaterThanEqualToExpression(cola4, new LiteralExpression("11", DataType.STRING));
+        new GreaterThanEqualToExpression(cola4, new LiteralExpression("11", DataTypes.STRING));
 
     Expression And1 = new AndExpression(new NotEqualsExpression(null, null), greaterThan2);
     Expression And2 = new AndExpression(And1, greaterThan1);
@@ -197,19 +198,19 @@ public class RangeFilterProcessorTest {
 
     // Build The output
 
-    ColumnExpression colb1 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression colb1 = new ColumnExpression("a", DataTypes.STRING);
     cola1.setDimension(true);
     cola1.setDimension(empDimension);
 
-    ColumnExpression colb2 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression colb2 = new ColumnExpression("a", DataTypes.STRING);
     cola2.setDimension(true);
     cola2.setDimension(empDimension);
 
     Expression greaterThanb1 =
-        new GreaterThanExpression(cola3, new LiteralExpression("12", DataType.STRING));
+        new GreaterThanExpression(cola3, new LiteralExpression("12", DataTypes.STRING));
 
     Expression lessThanb1 =
-        new LessThanEqualToExpression(cola1, new LiteralExpression("15", DataType.STRING));
+        new LessThanEqualToExpression(cola1, new LiteralExpression("15", DataTypes.STRING));
 
     Expression Andb1 =
         new AndExpression(new NotEqualsExpression(null, null), new TrueExpression(null));
@@ -237,33 +238,33 @@ public class RangeFilterProcessorTest {
     empColumnSchema.setColumnUniqueId("a");
     empColumnSchema.setDimensionColumn(true);
     empColumnSchema.setEncodingList(Arrays.asList(Encoding.DICTIONARY));
-    empColumnSchema.setDataType(DataType.STRING);
+    empColumnSchema.setDataType(DataTypes.STRING);
     CarbonDimension empDimension = new CarbonDimension(empColumnSchema, 0, 0, 0, 0, 0);
 
-    ColumnExpression cola1 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression cola1 = new ColumnExpression("a", DataTypes.STRING);
     cola1.setDimension(true);
     cola1.setDimension(empDimension);
 
-    ColumnExpression cola2 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression cola2 = new ColumnExpression("a", DataTypes.STRING);
     cola2.setDimension(true);
     cola2.setDimension(empDimension);
 
-    ColumnExpression cola3 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression cola3 = new ColumnExpression("a", DataTypes.STRING);
     cola3.setDimension(true);
     cola3.setDimension(empDimension);
 
-    ColumnExpression cola4 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression cola4 = new ColumnExpression("a", DataTypes.STRING);
     cola4.setDimension(true);
     cola4.setDimension(empDimension);
 
     Expression lessThan1 =
-        new LessThanEqualToExpression(cola1, new LiteralExpression("15", DataType.STRING));
+        new LessThanEqualToExpression(cola1, new LiteralExpression("15", DataTypes.STRING));
     Expression lessThan2 =
-        new LessThanEqualToExpression(cola2, new LiteralExpression("20", DataType.STRING));
+        new LessThanEqualToExpression(cola2, new LiteralExpression("20", DataTypes.STRING));
     Expression greaterThan1 =
-        new GreaterThanExpression(cola3, new LiteralExpression("12", DataType.STRING));
+        new GreaterThanExpression(cola3, new LiteralExpression("12", DataTypes.STRING));
     Expression greaterThan2 =
-        new GreaterThanEqualToExpression(cola4, new LiteralExpression("11", DataType.STRING));
+        new GreaterThanEqualToExpression(cola4, new LiteralExpression("11", DataTypes.STRING));
 
     Expression Or1 = new OrExpression(new NotEqualsExpression(null, null), greaterThan2);
     Expression Or2 = new OrExpression(Or1, greaterThan1);
@@ -272,30 +273,30 @@ public class RangeFilterProcessorTest {
 
     // Build The output
 
-    ColumnExpression colb1 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression colb1 = new ColumnExpression("a", DataTypes.STRING);
     cola1.setDimension(true);
     cola1.setDimension(empDimension);
 
-    ColumnExpression colb2 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression colb2 = new ColumnExpression("a", DataTypes.STRING);
     cola2.setDimension(true);
     cola2.setDimension(empDimension);
 
-    ColumnExpression colb3 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression colb3 = new ColumnExpression("a", DataTypes.STRING);
     cola3.setDimension(true);
     cola3.setDimension(empDimension);
 
-    ColumnExpression colb4 = new ColumnExpression("a", DataType.STRING);
+    ColumnExpression colb4 = new ColumnExpression("a", DataTypes.STRING);
     cola4.setDimension(true);
     cola4.setDimension(empDimension);
 
     Expression lessThanb1 =
-        new LessThanEqualToExpression(colb1, new LiteralExpression("15", DataType.STRING));
+        new LessThanEqualToExpression(colb1, new LiteralExpression("15", DataTypes.STRING));
     Expression lessThanb2 =
-        new LessThanEqualToExpression(colb2, new LiteralExpression("20", DataType.STRING));
+        new LessThanEqualToExpression(colb2, new LiteralExpression("20", DataTypes.STRING));
     Expression greaterThanb1 =
-        new GreaterThanExpression(colb3, new LiteralExpression("12", DataType.STRING));
+        new GreaterThanExpression(colb3, new LiteralExpression("12", DataTypes.STRING));
     Expression greaterThanb2 =
-        new GreaterThanEqualToExpression(colb4, new LiteralExpression("11", DataType.STRING));
+        new GreaterThanEqualToExpression(colb4, new LiteralExpression("11", DataTypes.STRING));
 
     Expression Orb1 = new OrExpression(new NotEqualsExpression(null, null), greaterThanb2);
     Expression Orb2 = new OrExpression(Orb1, greaterThanb1);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparatorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparatorTest.java b/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparatorTest.java
index 6958c97..cff1291 100644
--- a/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparatorTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparatorTest.java
@@ -22,6 +22,7 @@ import java.util.List;
 import org.apache.carbondata.core.cache.dictionary.Dictionary;
 import org.apache.carbondata.core.cache.dictionary.DictionaryChunksWrapper;
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 
 import mockit.Mock;
 import mockit.MockUp;
@@ -67,7 +68,7 @@ public class CarbonDictionarySortInfoPreparatorTest {
     };
 
     CarbonDictionarySortInfo carbonDictionarySortInfo = carbonDictionarySortInfoPreparator
-        .getDictionarySortInfo(newDistinctValues, dictionary, DataType.ARRAY);
+        .getDictionarySortInfo(newDistinctValues, dictionary, DataTypes.ARRAY);
     int expectedGetSortIndexValue = 1;
     int expectedGetSortInvertedIndexLength = 3;
     int actualGetSortIndexValue = carbonDictionarySortInfo.getSortIndex().get(0);
@@ -86,7 +87,7 @@ public class CarbonDictionarySortInfoPreparatorTest {
     newDistinctValues.add("xyz");
     Dictionary dictionary = null;
     CarbonDictionarySortInfo carbonDictionarySortInfo = carbonDictionarySortInfoPreparator
-        .getDictionarySortInfo(newDistinctValues, dictionary, DataType.ARRAY);
+        .getDictionarySortInfo(newDistinctValues, dictionary, DataTypes.ARRAY);
     int expectedGetSortIndexValue = 1;
     int expectedGetSortInvertedIndexLength = 2;
     int actualGetSortIndexValue = carbonDictionarySortInfo.getSortIndex().get(0);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModelTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModelTest.java b/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModelTest.java
index 83e48c3..a42b214 100644
--- a/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModelTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModelTest.java
@@ -17,6 +17,7 @@
 package org.apache.carbondata.core.writer.sortindex;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 
 import org.junit.Test;
 
@@ -32,63 +33,63 @@ public class CarbonDictionarySortModelTest {
   private CarbonDictionarySortModel carbonDictionarySortModel = null;
 
   @Test public void testCompareToForDataTypeDoubleCase() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DOUBLE, "7234");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DOUBLE, "7234");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.DOUBLE, "5678");
+        new CarbonDictionarySortModel(2, DataTypes.DOUBLE, "5678");
     int expectedResult = 1;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);
   }
 
   @Test public void testCompareToForDataTypeDoubleExceptionCase() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DOUBLE, "double");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DOUBLE, "double");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.DOUBLE, "@NU#LL$!");
+        new CarbonDictionarySortModel(2, DataTypes.DOUBLE, "@NU#LL$!");
     int expectedResult = -1;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);
   }
 
   @Test public void testCompareToForDataTypeDoubleExceptionCaseForOtherObject() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DOUBLE, "1234");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DOUBLE, "1234");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.DOUBLE, "@NU#LL$!");
+        new CarbonDictionarySortModel(2, DataTypes.DOUBLE, "@NU#LL$!");
     int expectedResult = -1;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);
   }
 
   @Test public void testCompareToForDataTypeBooleanCase() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.BOOLEAN, "memberValue");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.BOOLEAN, "memberValue");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.DOUBLE, "value");
+        new CarbonDictionarySortModel(2, DataTypes.DOUBLE, "value");
     int expectedResult = -9;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);
   }
 
   @Test public void testCompareToForDataTypeDecimalCase() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DECIMAL, "72.34");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DECIMAL, "72.34");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.DECIMAL, "56.78");
+        new CarbonDictionarySortModel(2, DataTypes.DECIMAL, "56.78");
     int expectedResult = 1;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);
   }
 
   @Test public void testCompareToForDataTypeDecimalExceptionCase() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DECIMAL, "decimal");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DECIMAL, "decimal");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.DECIMAL, "@NU#LL$!");
+        new CarbonDictionarySortModel(2, DataTypes.DECIMAL, "@NU#LL$!");
     int expectedResult = -1;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);
   }
 
   @Test public void testCompareToForDataTypeDecimalExceptionCaseForOtherObject() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DECIMAL, "15.24");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DECIMAL, "15.24");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.DECIMAL, "@NU#LL$!");
+        new CarbonDictionarySortModel(2, DataTypes.DECIMAL, "@NU#LL$!");
     int expectedResult = -1;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);
@@ -96,9 +97,9 @@ public class CarbonDictionarySortModelTest {
 
   @Test public void testCompareToForDataTypeTimestampCase() {
     carbonDictionarySortModel =
-        new CarbonDictionarySortModel(1, DataType.TIMESTAMP, "2014-09-22 12:00:00");
+        new CarbonDictionarySortModel(1, DataTypes.TIMESTAMP, "2014-09-22 12:00:00");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.TIMESTAMP, "2015-09-22 12:08:49");
+        new CarbonDictionarySortModel(2, DataTypes.TIMESTAMP, "2015-09-22 12:08:49");
     int expectedResult = -1;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);
@@ -106,9 +107,9 @@ public class CarbonDictionarySortModelTest {
 
   @Test public void testCompareToForDataTypeTimestampExceptionCase() {
     carbonDictionarySortModel =
-        new CarbonDictionarySortModel(1, DataType.TIMESTAMP, "2014-09 12:00:00");
+        new CarbonDictionarySortModel(1, DataTypes.TIMESTAMP, "2014-09 12:00:00");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.TIMESTAMP, "@NU#LL$!");
+        new CarbonDictionarySortModel(2, DataTypes.TIMESTAMP, "@NU#LL$!");
     int expectedResult = -1;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);
@@ -116,88 +117,88 @@ public class CarbonDictionarySortModelTest {
 
   @Test public void testCompareToForDataTypeTimestampExceptionCaseForOtherObject() {
     carbonDictionarySortModel =
-        new CarbonDictionarySortModel(1, DataType.TIMESTAMP, "2014-09-22 12:00:00");
+        new CarbonDictionarySortModel(1, DataTypes.TIMESTAMP, "2014-09-22 12:00:00");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.TIMESTAMP, "2014-09-22 12");
+        new CarbonDictionarySortModel(2, DataTypes.TIMESTAMP, "2014-09-22 12");
     int expectedResult = -1;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);
   }
 
   @Test public void testHashCode() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DECIMAL, "15.24");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DECIMAL, "15.24");
     int actualResult = carbonDictionarySortModel.hashCode();
     int expectedResult = 46877260;
     assertTrue(actualResult == expectedResult);
   }
 
   @Test public void testHashCodeNullCaseForMemberValue() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DECIMAL, null);
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DECIMAL, null);
     int actualResult = carbonDictionarySortModel.hashCode();
     int expectedResult = 0;
     assertEquals(actualResult, expectedResult);
   }
 
   @Test public void testEquals() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DECIMAL, "15.24");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DECIMAL, "15.24");
     CarbonDictionarySortModel testCarbonDictionarySortModel = carbonDictionarySortModel;
     boolean result = carbonDictionarySortModel.equals(testCarbonDictionarySortModel);
     assertTrue(result);
   }
 
   @Test public void testEqualsMemberValueNullCase() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DECIMAL, null);
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DECIMAL, null);
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(1, DataType.BOOLEAN, "false");
+        new CarbonDictionarySortModel(1, DataTypes.BOOLEAN, "false");
     boolean result = carbonDictionarySortModel.equals(testCarbonDictionarySortModel);
     assertFalse(result);
   }
 
   @Test public void testEqualsWhenMemberValueDiffers() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DECIMAL, "12.45");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DECIMAL, "12.45");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(1, DataType.BOOLEAN, "false");
+        new CarbonDictionarySortModel(1, DataTypes.BOOLEAN, "false");
     boolean result = carbonDictionarySortModel.equals(testCarbonDictionarySortModel);
     assertFalse(result);
   }
 
   @Test public void testEqualsWhenMemberValueIsSame() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DECIMAL, "12.45");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DECIMAL, "12.45");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(1, DataType.DECIMAL, "12.45");
+        new CarbonDictionarySortModel(1, DataTypes.DECIMAL, "12.45");
     boolean result = carbonDictionarySortModel.equals(testCarbonDictionarySortModel);
     assertTrue(result);
   }
 
   @Test public void testEqualsForDifferentObjects() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DECIMAL, "12.45");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DECIMAL, "12.45");
     Object testCarbonDictionarySortModel = new Object();
     boolean result = carbonDictionarySortModel.equals(testCarbonDictionarySortModel);
     assertFalse(result);
   }
 
   @Test public void testCompareToForDataTypeDoubleExceptionCaseForDifferentObject() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DOUBLE, "double");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DOUBLE, "double");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.DOUBLE, "1234");
+        new CarbonDictionarySortModel(2, DataTypes.DOUBLE, "1234");
     int expectedResult = 1;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);
   }
 
   @Test public void testCompareToForDataTypeDecimalExceptionCaseForDifferentObject() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.DECIMAL, "12.il");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.DECIMAL, "12.il");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.DECIMAL, "12.89");
+        new CarbonDictionarySortModel(2, DataTypes.DECIMAL, "12.89");
     int expectedResult = 1;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);
   }
 
   @Test public void testCompareToForDataTypeTimestampExceptionCaseForDifferentObject() {
-    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataType.TIMESTAMP, "2014-09");
+    carbonDictionarySortModel = new CarbonDictionarySortModel(1, DataTypes.TIMESTAMP, "2014-09");
     CarbonDictionarySortModel testCarbonDictionarySortModel =
-        new CarbonDictionarySortModel(2, DataType.TIMESTAMP, "2014-09-22 12:00:00");
+        new CarbonDictionarySortModel(2, DataTypes.TIMESTAMP, "2014-09-22 12:00:00");
     int expectedResult = 1;
     int actualResult = carbonDictionarySortModel.compareTo(testCarbonDictionarySortModel);
     assertEquals(actualResult, expectedResult);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputFormat_FT.java
----------------------------------------------------------------------
diff --git a/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputFormat_FT.java b/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputFormat_FT.java
index 654aff7..4a5a9cf 100644
--- a/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputFormat_FT.java
+++ b/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputFormat_FT.java
@@ -20,6 +20,7 @@ package org.apache.carbondata.hadoop.ft;
 import java.util.List;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.hadoop.CarbonInputFormat;
 import org.apache.carbondata.core.scan.expression.ColumnExpression;
 import org.apache.carbondata.core.scan.expression.Expression;
@@ -62,8 +63,8 @@ public class CarbonInputFormat_FT extends TestCase {
     Job job = Job.getInstance(jobConf);
     FileInputFormat.addInputPath(job, new Path("/opt/carbonstore/db/table1"));
     job.getConfiguration().set(CarbonInputFormat.INPUT_SEGMENT_NUMBERS, "1,2");
-    Expression expression = new EqualToExpression(new ColumnExpression("c1", DataType.STRING),
-        new LiteralExpression("a", DataType.STRING));
+    Expression expression = new EqualToExpression(new ColumnExpression("c1", DataTypes.STRING),
+        new LiteralExpression("a", DataTypes.STRING));
     CarbonInputFormat.setFilterPredicates(job.getConfiguration(), expression);
     List splits = carbonInputFormat.getSplits(job);
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputMapperTest.java
----------------------------------------------------------------------
diff --git a/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputMapperTest.java b/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputMapperTest.java
index 86a3326..865dabe 100644
--- a/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputMapperTest.java
+++ b/hadoop/src/test/java/org/apache/carbondata/hadoop/ft/CarbonInputMapperTest.java
@@ -26,6 +26,7 @@ import java.io.IOException;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.core.util.CarbonProperties;
 import org.apache.carbondata.core.util.CarbonUtil;
 import org.apache.carbondata.hadoop.CarbonInputFormat;
@@ -105,8 +106,8 @@ public class CarbonInputMapperTest extends TestCase {
       carbonProjection.addColumn("country");
       carbonProjection.addColumn("salary");
       Expression expression =
-          new EqualToExpression(new ColumnExpression("country", DataType.STRING),
-              new LiteralExpression("france", DataType.STRING));
+          new EqualToExpression(new ColumnExpression("country", DataTypes.STRING),
+              new LiteralExpression("france", DataTypes.STRING));
       runJob(outPath, carbonProjection, expression);
       Assert.assertEquals("Count lines are not matching", 101, countTheLines(outPath));
       Assert.assertEquals("Column count are not matching", 3, countTheColumns(outPath));

http://git-wip-us.apache.org/repos/asf/carbondata/blob/956833e5/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/ObjectSerializationUtilTest.java
----------------------------------------------------------------------
diff --git a/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/ObjectSerializationUtilTest.java b/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/ObjectSerializationUtilTest.java
index 960c836..ac90aa5 100644
--- a/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/ObjectSerializationUtilTest.java
+++ b/hadoop/src/test/java/org/apache/carbondata/hadoop/test/util/ObjectSerializationUtilTest.java
@@ -18,6 +18,7 @@
 package org.apache.carbondata.hadoop.test.util;
 
 import org.apache.carbondata.core.metadata.datatype.DataType;
+import org.apache.carbondata.core.metadata.datatype.DataTypes;
 import org.apache.carbondata.hadoop.util.ObjectSerializationUtil;
 import org.apache.carbondata.core.scan.expression.ColumnExpression;
 import org.apache.carbondata.core.scan.expression.Expression;
@@ -36,15 +37,15 @@ public class ObjectSerializationUtilTest extends TestCase {
   }
 
   @Test public void testConvertObjectToString() throws Exception {
-    Expression expression = new EqualToExpression(new ColumnExpression("c1", DataType.STRING),
-        new LiteralExpression("a", DataType.STRING));
+    Expression expression = new EqualToExpression(new ColumnExpression("c1", DataTypes.STRING),
+        new LiteralExpression("a", DataTypes.STRING));
     String string = ObjectSerializationUtil.convertObjectToString(expression);
     Assert.assertTrue(string != null);
   }
 
   @Test public void testConvertStringToObject() throws Exception {
-    Expression expression = new EqualToExpression(new ColumnExpression("c1", DataType.STRING),
-        new LiteralExpression("a", DataType.STRING));
+    Expression expression = new EqualToExpression(new ColumnExpression("c1", DataTypes.STRING),
+        new LiteralExpression("a", DataTypes.STRING));
     String string = ObjectSerializationUtil.convertObjectToString(expression);
     Assert.assertTrue(string != null);
     Object object = ObjectSerializationUtil.convertStringToObject(string);


Mime
View raw message