carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gvram...@apache.org
Subject [5/8] carbondata git commit: [CARBONDATA-2720] Remove dead code
Date Thu, 12 Jul 2018 06:55:12 GMT
http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/core/src/test/java/org/apache/carbondata/core/datastore/SegmentTaskIndexStoreTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/SegmentTaskIndexStoreTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/SegmentTaskIndexStoreTest.java
deleted file mode 100644
index 19e91da..0000000
--- a/core/src/test/java/org/apache/carbondata/core/datastore/SegmentTaskIndexStoreTest.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.carbondata.core.datastore;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.carbondata.core.cache.CacheProvider;
-import org.apache.carbondata.core.cache.CacheType;
-import org.apache.carbondata.core.datastore.block.AbstractIndex;
-import org.apache.carbondata.core.datastore.block.SegmentTaskIndexWrapper;
-import org.apache.carbondata.core.datastore.block.TableBlockInfo;
-import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
-import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
-import org.apache.carbondata.core.metadata.ColumnarFormatVersion;
-import org.apache.carbondata.core.metadata.blocklet.BlockletInfo;
-import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;
-import org.apache.carbondata.core.metadata.blocklet.SegmentInfo;
-import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
-
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import static org.junit.Assert.assertNull;
-
-public class SegmentTaskIndexStoreTest {
-
-  private static short version = 1;
-  private static String locations[] = { "/tmp" };
-  private static SegmentTaskIndexStore taskIndexStore;
-  private static TableBlockInfo tableBlockInfo;
-  private static AbsoluteTableIdentifier absoluteTableIdentifier;
-
-  @BeforeClass public static void setUp() {
-    CacheProvider cacheProvider = CacheProvider.getInstance();
-    taskIndexStore = (SegmentTaskIndexStore) cacheProvider.
-        <TableSegmentUniqueIdentifier, SegmentTaskIndexWrapper>
-            createCache(CacheType.DRIVER_BTREE);
-    tableBlockInfo = new TableBlockInfo("file", 0L, "SG100", locations, 10L,
-        ColumnarFormatVersion.valueOf(version), null);
-    absoluteTableIdentifier = AbsoluteTableIdentifier.from("/tmp",
-        new CarbonTableIdentifier("testdatabase", "testtable", "TB100"));
-  }
-
-  private List<DataFileFooter> getDataFileFooters() {
-    SegmentInfo segmentInfo = new SegmentInfo();
-    DataFileFooter footer = new DataFileFooter();
-    ColumnSchema columnSchema = new ColumnSchema();
-    BlockletInfo blockletInfo = new BlockletInfo();
-    List<DataFileFooter> footerList = new ArrayList<DataFileFooter>();
-    List<ColumnSchema> columnSchemaList = new ArrayList<ColumnSchema>();
-
-    columnSchema.setColumnName("employeeName");
-    columnSchemaList.add(new ColumnSchema());
-
-    footer.setSegmentInfo(segmentInfo);
-    footer.setColumnInTable(columnSchemaList);
-    footer.setBlockletList(Arrays.asList(blockletInfo));
-    footerList.add(footer);
-    return footerList;
-  }
-
-  @Test public void checkExistenceOfSegmentBTree() {
-    TableSegmentUniqueIdentifier tableSegmentUniqueIdentifier =
-        new TableSegmentUniqueIdentifier(absoluteTableIdentifier, "SG100");
-    SegmentTaskIndexWrapper segmentTaskIndexWrapper =
-        taskIndexStore.getIfPresent(tableSegmentUniqueIdentifier);
-    Map<SegmentTaskIndexStore.TaskBucketHolder, AbstractIndex> result = segmentTaskIndexWrapper != null ?
-        segmentTaskIndexWrapper.getTaskIdToTableSegmentMap() :
-        null;
-    assertNull(result);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/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 20036ec..68bf896 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
@@ -89,13 +89,13 @@ public class SegmentPropertiesTest extends TestCase {
     dimensionOrdinalToBlockMapping.put(0, 0);
     dimensionOrdinalToBlockMapping.put(1, 1);
     dimensionOrdinalToBlockMapping.put(2, 2);
-    dimensionOrdinalToBlockMapping.put(3, 2);
-    dimensionOrdinalToBlockMapping.put(4, 3);
-    dimensionOrdinalToBlockMapping.put(5, 4);
-    dimensionOrdinalToBlockMapping.put(6, 4);
-    dimensionOrdinalToBlockMapping.put(7, 4);
-    dimensionOrdinalToBlockMapping.put(8, 5);
-    dimensionOrdinalToBlockMapping.put(9, 6);
+    dimensionOrdinalToBlockMapping.put(3, 3);
+    dimensionOrdinalToBlockMapping.put(4, 4);
+    dimensionOrdinalToBlockMapping.put(5, 5);
+    dimensionOrdinalToBlockMapping.put(6, 6);
+    dimensionOrdinalToBlockMapping.put(7, 7);
+    dimensionOrdinalToBlockMapping.put(8, 8);
+    dimensionOrdinalToBlockMapping.put(9, 9);
     Map<Integer, Integer> dimensionOrdinalToBlockMappingActual =
         blockMetadataInfos.getDimensionOrdinalToChunkMapping();
     assertEquals(dimensionOrdinalToBlockMapping.size(),
@@ -143,7 +143,7 @@ public class SegmentPropertiesTest extends TestCase {
   }
 
   @Test public void testEachColumnValueSizeHasProperValue() {
-    int[] size = { 1, -1, 2, -1, 3 };
+    int[] size = { 1, -1, 1, 1, -1, 1, 1, 1 };
     int[] eachDimColumnValueSize = blockMetadataInfos.getEachDimColumnValueSize();
     boolean isEqual = false;
     for (int i = 0; i < size.length; i++) {
@@ -170,7 +170,6 @@ public class SegmentPropertiesTest extends TestCase {
 
   private ColumnSchema getDimensionColumn1() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -185,7 +184,6 @@ public class SegmentPropertiesTest extends TestCase {
 
   private ColumnSchema getDimensionColumn2() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI1");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -199,7 +197,6 @@ public class SegmentPropertiesTest extends TestCase {
 
   private ColumnSchema getDimensionColumn3() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI2");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -208,14 +205,12 @@ public class SegmentPropertiesTest extends TestCase {
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
     encodeList.add(Encoding.DICTIONARY);
     dimColumn.setEncodingList(encodeList);
-    dimColumn.setColumnGroup(0);
     dimColumn.setNumberOfChild(0);
     return dimColumn;
   }
 
   private ColumnSchema getDimensionColumn4() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI3");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -225,13 +220,11 @@ public class SegmentPropertiesTest extends TestCase {
     encodeList.add(Encoding.DICTIONARY);
     dimColumn.setEncodingList(encodeList);
     dimColumn.setNumberOfChild(0);
-    dimColumn.setColumnGroup(0);
     return dimColumn;
   }
 
   private ColumnSchema getDimensionColumn5() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI4");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -245,7 +238,6 @@ public class SegmentPropertiesTest extends TestCase {
 
   private ColumnSchema getDimensionColumn9() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI9");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -254,14 +246,12 @@ public class SegmentPropertiesTest extends TestCase {
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
     encodeList.add(Encoding.DICTIONARY);
     dimColumn.setEncodingList(encodeList);
-    dimColumn.setColumnGroup(1);
     dimColumn.setNumberOfChild(0);
     return dimColumn;
   }
 
   private ColumnSchema getDimensionColumn10() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI10");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -271,13 +261,11 @@ public class SegmentPropertiesTest extends TestCase {
     encodeList.add(Encoding.DICTIONARY);
     dimColumn.setEncodingList(encodeList);
     dimColumn.setNumberOfChild(0);
-    dimColumn.setColumnGroup(1);
     return dimColumn;
   }
 
   private ColumnSchema getDimensionColumn11() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI11");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -287,13 +275,11 @@ public class SegmentPropertiesTest extends TestCase {
     encodeList.add(Encoding.DICTIONARY);
     dimColumn.setEncodingList(encodeList);
     dimColumn.setNumberOfChild(0);
-    dimColumn.setColumnGroup(1);
     return dimColumn;
   }
 
   private ColumnSchema getDimensionColumn6() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI5");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.createDefaultArrayType());
@@ -308,7 +294,6 @@ public class SegmentPropertiesTest extends TestCase {
 
   private ColumnSchema getDimensionColumn7() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI6");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/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 9da5a53..2404498 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
@@ -52,7 +52,6 @@ public class SegmentPropertiesTestUtil {
 
   public static ColumnSchema getDimensionColumn1() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -67,7 +66,6 @@ public class SegmentPropertiesTestUtil {
 
   public static ColumnSchema getDimensionColumn2() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI1");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -81,7 +79,6 @@ public class SegmentPropertiesTestUtil {
 
   public static ColumnSchema getDimensionColumn3() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI2");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -90,14 +87,12 @@ public class SegmentPropertiesTestUtil {
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
     encodeList.add(Encoding.DICTIONARY);
     dimColumn.setEncodingList(encodeList);
-    dimColumn.setColumnGroup(0);
     dimColumn.setNumberOfChild(0);
     return dimColumn;
   }
 
   public static ColumnSchema getDimensionColumn4() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI3");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -107,13 +102,11 @@ public class SegmentPropertiesTestUtil {
     encodeList.add(Encoding.DICTIONARY);
     dimColumn.setEncodingList(encodeList);
     dimColumn.setNumberOfChild(0);
-    dimColumn.setColumnGroup(0);
     return dimColumn;
   }
 
   public static ColumnSchema getDimensionColumn5() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI4");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -127,7 +120,6 @@ public class SegmentPropertiesTestUtil {
 
   public static ColumnSchema getDimensionColumn9() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI9");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -136,14 +128,12 @@ public class SegmentPropertiesTestUtil {
         new ArrayList<Encoding>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
     encodeList.add(Encoding.DICTIONARY);
     dimColumn.setEncodingList(encodeList);
-    dimColumn.setColumnGroup(1);
     dimColumn.setNumberOfChild(0);
     return dimColumn;
   }
 
   public static ColumnSchema getDimensionColumn10() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI10");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -153,13 +143,11 @@ public class SegmentPropertiesTestUtil {
     encodeList.add(Encoding.DICTIONARY);
     dimColumn.setEncodingList(encodeList);
     dimColumn.setNumberOfChild(0);
-    dimColumn.setColumnGroup(1);
     return dimColumn;
   }
 
   public static ColumnSchema getDimensionColumn11() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(false);
     dimColumn.setColumnName("IMEI11");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -169,13 +157,11 @@ public class SegmentPropertiesTestUtil {
     encodeList.add(Encoding.DICTIONARY);
     dimColumn.setEncodingList(encodeList);
     dimColumn.setNumberOfChild(0);
-    dimColumn.setColumnGroup(1);
     return dimColumn;
   }
 
   public static ColumnSchema getDimensionColumn6() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI5");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.createDefaultArrayType());
@@ -190,7 +176,6 @@ public class SegmentPropertiesTestUtil {
 
   public static ColumnSchema getDimensionColumn7() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI6");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentTaskIndexTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentTaskIndexTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentTaskIndexTest.java
deleted file mode 100644
index 4c08c6b..0000000
--- a/core/src/test/java/org/apache/carbondata/core/datastore/block/SegmentTaskIndexTest.java
+++ /dev/null
@@ -1,77 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.carbondata.core.datastore.block;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.carbondata.core.datastore.BTreeBuilderInfo;
-import org.apache.carbondata.core.datastore.impl.btree.BlockBTreeBuilder;
-import org.apache.carbondata.core.metadata.blocklet.BlockletInfo;
-import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;
-import org.apache.carbondata.core.metadata.blocklet.SegmentInfo;
-import org.apache.carbondata.core.metadata.blocklet.index.BlockletIndex;
-import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
-
-import mockit.Mock;
-import mockit.MockUp;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import static junit.framework.TestCase.assertEquals;
-
-public class SegmentTaskIndexTest {
-
-  private static SegmentInfo segmentInfo;
-  private static DataFileFooter footer;
-  private static ColumnSchema columnSchema;
-  private static BlockletInfo blockletInfo;
-  private static BlockletIndex blockletIndex;
-  private static List<DataFileFooter> footerList = new ArrayList<DataFileFooter>();
-  private static List<ColumnSchema> columnSchemaList = new ArrayList<ColumnSchema>();
-
-  @BeforeClass public static void setUp() {
-    segmentInfo = new SegmentInfo();
-    footer = new DataFileFooter();
-    columnSchema = new ColumnSchema();
-    blockletInfo = new BlockletInfo();
-    blockletIndex = new BlockletIndex();
-  }
-
-  @Test public void testBuild() {
-    new MockUp<BlockBTreeBuilder>() {
-      @Mock public void build(BTreeBuilderInfo segmentBuilderInfos) {}
-    };
-    long numberOfRows = 100;
-    columnSchema.setColumnName("employeeName");
-    columnSchemaList.add(new ColumnSchema());
-
-    footer.setSegmentInfo(segmentInfo);
-    footer.setColumnInTable(columnSchemaList);
-    footer.setBlockletList(Arrays.asList(blockletInfo));
-    footer.setNumberOfRows(numberOfRows);
-    footerList.add(footer);
-
-    SegmentProperties properties = new SegmentProperties(footerList.get(0).getColumnInTable(),
-        footerList.get(0).getSegmentInfo().getColumnCardinality());
-    SegmentTaskIndex segmentTaskIndex = new SegmentTaskIndex(properties);
-    segmentTaskIndex.buildIndex(footerList);
-    assertEquals(footerList.get(0).getNumberOfRows(), numberOfRows);
-
-  }
-}

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/core/src/test/java/org/apache/carbondata/core/datastore/chunk/impl/FixedLengthDimensionDataChunkTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/chunk/impl/FixedLengthDimensionDataChunkTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/chunk/impl/FixedLengthDimensionDataChunkTest.java
index f327ef6..8dabe4c 100644
--- a/core/src/test/java/org/apache/carbondata/core/datastore/chunk/impl/FixedLengthDimensionDataChunkTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/chunk/impl/FixedLengthDimensionDataChunkTest.java
@@ -21,8 +21,6 @@ import static org.junit.Assert.assertEquals;
 
 import java.util.Arrays;
 
-import org.apache.carbondata.core.scan.executor.infos.KeyStructureInfo;
-
 import org.junit.Assert;
 import org.junit.BeforeClass;
 import org.junit.Test;
@@ -44,11 +42,8 @@ public class FixedLengthDimensionDataChunkTest {
   }
 
   @Test public void fillChunkDataTest() {
-    KeyStructureInfo keyStructureInfo = new KeyStructureInfo();
     int[] maskByteRanges = { 1, 2, 4, 6, 5 };
-    keyStructureInfo.setMaskByteRanges(maskByteRanges);
-    keyStructureInfo.setMaxKey("1234567".getBytes());
-    int res = fixedLengthDimensionDataChunk.fillRawData(0, 0, data, keyStructureInfo);
+    int res = fixedLengthDimensionDataChunk.fillRawData(0, 0, data);
     int expectedResult = 4 ;
     assertEquals(res, expectedResult);
   }
@@ -61,8 +56,7 @@ public class FixedLengthDimensionDataChunkTest {
 
   @Test public void fillConvertedChunkDataTest() {
     int[] row = { 1, 2, 4, 6 };
-    KeyStructureInfo keyStructureInfo = new KeyStructureInfo();
-    int res = fixedLengthDimensionDataChunk.fillSurrogateKey(1, 0, row, keyStructureInfo);
+    int res = fixedLengthDimensionDataChunk.fillSurrogateKey(1, 0, row);
     int expectedResult = 1;
     assertEquals(res, expectedResult);
   }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/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
deleted file mode 100644
index 8976b2e..0000000
--- a/core/src/test/java/org/apache/carbondata/core/datastore/page/encoding/RLECodecSuite.java
+++ /dev/null
@@ -1,158 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.carbondata.core.datastore.page.encoding;
-
-import java.io.ByteArrayOutputStream;
-import java.io.DataOutputStream;
-import java.io.IOException;
-
-import org.apache.carbondata.core.datastore.ColumnType;
-import org.apache.carbondata.core.datastore.TableSpec;
-import org.apache.carbondata.core.datastore.page.ColumnPage;
-import org.apache.carbondata.core.datastore.page.encoding.rle.RLECodec;
-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.DataTypes;
-
-import org.junit.AfterClass;
-import org.junit.BeforeClass;
-import org.junit.Test;
-
-import static org.junit.Assert.assertEquals;
-
-public class RLECodecSuite {
-
-  static class TestData {
-    private byte[] inputByteData;
-    private ColumnPage inputBytePage;
-    private byte[] expectedEncodedByteData;
-
-    TestData(byte[] inputByteData, byte[] expectedEncodedByteData) throws IOException, MemoryException {
-      this.inputByteData = inputByteData;
-      inputBytePage = ColumnPage.newPage(
-          TableSpec.ColumnSpec.newInstance("test", DataTypes.BYTE, ColumnType.MEASURE),
-          DataTypes.BYTE, inputByteData.length);
-      inputBytePage.setStatsCollector(PrimitivePageStatsCollector.newInstance(DataTypes.BYTE));
-      for (int i = 0; i < inputByteData.length; i++) {
-        inputBytePage.putData(i, inputByteData[i]);
-      }
-      this.expectedEncodedByteData = expectedEncodedByteData;
-    }
-
-  }
-
-  private static TestData data1;
-  private static TestData data2;
-  private static TestData data3;
-
-  @BeforeClass public static void setUp() throws IOException, MemoryException {
-    setUpData1();
-    setUpData2();
-    setUpData3();
-  }
-
-  private static void setUpData1() throws IOException, MemoryException {
-    byte[] inputData = new byte[]{10, 10, 3, 4, 5, 6, 7, 7, 7, 7};
-    ByteArrayOutputStream bao = new ByteArrayOutputStream();
-    DataOutputStream stream = new DataOutputStream(bao);
-    stream.writeShort(2);
-    stream.writeByte(10);
-    stream.writeShort(5|0x8000);
-    stream.writeByte(3);
-    stream.writeByte(4);
-    stream.writeByte(5);
-    stream.writeByte(6);
-    stream.writeByte(7);
-    stream.writeShort(3);
-    stream.writeByte(7);
-    byte[] expectedEncodedByteData = bao.toByteArray();
-    data1 = new TestData(
-        inputData,
-        expectedEncodedByteData);
-  }
-
-  private static void setUpData2() throws IOException, MemoryException {
-    byte[] inputData = new byte[]{1, 2, 3, 4, 5, 6};
-    ByteArrayOutputStream bao = new ByteArrayOutputStream();
-    DataOutputStream stream = new DataOutputStream(bao);
-    stream.writeShort(6|0x8000);
-    stream.writeByte(1);
-    stream.writeByte(2);
-    stream.writeByte(3);
-    stream.writeByte(4);
-    stream.writeByte(5);
-    stream.writeByte(6);
-    byte[] expectedEncodedByteData = bao.toByteArray();
-    data2 = new TestData(
-        inputData,
-        expectedEncodedByteData);
-  }
-
-  private static void setUpData3() throws IOException, MemoryException {
-    byte[] inputData = new byte[]{10, 10, 10, 10, 10, 10};
-    ByteArrayOutputStream bao = new ByteArrayOutputStream();
-    DataOutputStream stream = new DataOutputStream(bao);
-    stream.writeShort(6);
-    stream.writeByte(10);
-    byte[] expectedEncodedByteData = bao.toByteArray();
-    data3 = new TestData(
-        inputData,
-        expectedEncodedByteData);
-  }
-
-  private void testBytePageEncode(ColumnPage inputPage, byte[] expectedEncodedBytes)
-      throws IOException, MemoryException {
-    RLECodec codec = new RLECodec();
-    ColumnPageEncoder encoder = codec.createEncoder(null);
-    EncodedColumnPage result = encoder.encode(inputPage);
-    byte[] encoded = result.getEncodedData().array();
-    assertEquals(expectedEncodedBytes.length, encoded.length);
-    for (int i = 0; i < encoded.length; i++) {
-      assertEquals(expectedEncodedBytes[i], encoded[i]);
-    }
-  }
-
-  private void testBytePageDecode(byte[] inputBytes, byte[] expectedDecodedBytes) throws IOException, MemoryException {
-    RLECodec codec = new RLECodec();
-    RLEEncoderMeta meta = new RLEEncoderMeta(
-        TableSpec.ColumnSpec.newInstance("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();
-    assertEquals(expectedDecodedBytes.length, decoded.length);
-    for (int i = 0; i < decoded.length; i++) {
-      assertEquals(expectedDecodedBytes[i], decoded[i]);
-    }
-  }
-
-  @Test public void testBytePageEncode() throws MemoryException, IOException {
-    testBytePageEncode(data1.inputBytePage, data1.expectedEncodedByteData);
-    testBytePageEncode(data2.inputBytePage, data2.expectedEncodedByteData);
-    testBytePageEncode(data3.inputBytePage, data3.expectedEncodedByteData);
-  }
-
-  @Test public void testBytePageDecode() throws IOException, MemoryException {
-    testBytePageDecode(data1.expectedEncodedByteData, data1.inputByteData);
-    testBytePageDecode(data2.expectedEncodedByteData, data2.inputByteData);
-    testBytePageDecode(data3.expectedEncodedByteData, data3.inputByteData);
-  }
-
-  @AfterClass public static void tearDown() {
-  }
-}

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/core/src/test/java/org/apache/carbondata/core/datastore/page/encoding/RLECodecTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/datastore/page/encoding/RLECodecTest.java b/core/src/test/java/org/apache/carbondata/core/datastore/page/encoding/RLECodecTest.java
new file mode 100644
index 0000000..8360e02
--- /dev/null
+++ b/core/src/test/java/org/apache/carbondata/core/datastore/page/encoding/RLECodecTest.java
@@ -0,0 +1,158 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.carbondata.core.datastore.page.encoding;
+
+import java.io.ByteArrayOutputStream;
+import java.io.DataOutputStream;
+import java.io.IOException;
+
+import org.apache.carbondata.core.datastore.ColumnType;
+import org.apache.carbondata.core.datastore.TableSpec;
+import org.apache.carbondata.core.datastore.page.ColumnPage;
+import org.apache.carbondata.core.datastore.page.encoding.rle.RLECodec;
+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.DataTypes;
+
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import static org.junit.Assert.assertEquals;
+
+public class RLECodecTest {
+
+  static class TestData {
+    private byte[] inputByteData;
+    private ColumnPage inputBytePage;
+    private byte[] expectedEncodedByteData;
+
+    TestData(byte[] inputByteData, byte[] expectedEncodedByteData) throws IOException, MemoryException {
+      this.inputByteData = inputByteData;
+      inputBytePage = ColumnPage.newPage(
+          TableSpec.ColumnSpec.newInstance("test", DataTypes.BYTE, ColumnType.MEASURE),
+          DataTypes.BYTE, inputByteData.length);
+      inputBytePage.setStatsCollector(PrimitivePageStatsCollector.newInstance(DataTypes.BYTE));
+      for (int i = 0; i < inputByteData.length; i++) {
+        inputBytePage.putData(i, inputByteData[i]);
+      }
+      this.expectedEncodedByteData = expectedEncodedByteData;
+    }
+
+  }
+
+  private static TestData data1;
+  private static TestData data2;
+  private static TestData data3;
+
+  @BeforeClass public static void setUp() throws IOException, MemoryException {
+    setUpData1();
+    setUpData2();
+    setUpData3();
+  }
+
+  private static void setUpData1() throws IOException, MemoryException {
+    byte[] inputData = new byte[]{10, 10, 3, 4, 5, 6, 7, 7, 7, 7};
+    ByteArrayOutputStream bao = new ByteArrayOutputStream();
+    DataOutputStream stream = new DataOutputStream(bao);
+    stream.writeShort(2);
+    stream.writeByte(10);
+    stream.writeShort(5|0x8000);
+    stream.writeByte(3);
+    stream.writeByte(4);
+    stream.writeByte(5);
+    stream.writeByte(6);
+    stream.writeByte(7);
+    stream.writeShort(3);
+    stream.writeByte(7);
+    byte[] expectedEncodedByteData = bao.toByteArray();
+    data1 = new TestData(
+        inputData,
+        expectedEncodedByteData);
+  }
+
+  private static void setUpData2() throws IOException, MemoryException {
+    byte[] inputData = new byte[]{1, 2, 3, 4, 5, 6};
+    ByteArrayOutputStream bao = new ByteArrayOutputStream();
+    DataOutputStream stream = new DataOutputStream(bao);
+    stream.writeShort(6|0x8000);
+    stream.writeByte(1);
+    stream.writeByte(2);
+    stream.writeByte(3);
+    stream.writeByte(4);
+    stream.writeByte(5);
+    stream.writeByte(6);
+    byte[] expectedEncodedByteData = bao.toByteArray();
+    data2 = new TestData(
+        inputData,
+        expectedEncodedByteData);
+  }
+
+  private static void setUpData3() throws IOException, MemoryException {
+    byte[] inputData = new byte[]{10, 10, 10, 10, 10, 10};
+    ByteArrayOutputStream bao = new ByteArrayOutputStream();
+    DataOutputStream stream = new DataOutputStream(bao);
+    stream.writeShort(6);
+    stream.writeByte(10);
+    byte[] expectedEncodedByteData = bao.toByteArray();
+    data3 = new TestData(
+        inputData,
+        expectedEncodedByteData);
+  }
+
+  private void testBytePageEncode(ColumnPage inputPage, byte[] expectedEncodedBytes)
+      throws IOException, MemoryException {
+    RLECodec codec = new RLECodec();
+    ColumnPageEncoder encoder = codec.createEncoder(null);
+    EncodedColumnPage result = encoder.encode(inputPage);
+    byte[] encoded = result.getEncodedData().array();
+    assertEquals(expectedEncodedBytes.length, encoded.length);
+    for (int i = 0; i < encoded.length; i++) {
+      assertEquals(expectedEncodedBytes[i], encoded[i]);
+    }
+  }
+
+  private void testBytePageDecode(byte[] inputBytes, byte[] expectedDecodedBytes) throws IOException, MemoryException {
+    RLECodec codec = new RLECodec();
+    RLEEncoderMeta meta = new RLEEncoderMeta(
+        TableSpec.ColumnSpec.newInstance("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();
+    assertEquals(expectedDecodedBytes.length, decoded.length);
+    for (int i = 0; i < decoded.length; i++) {
+      assertEquals(expectedDecodedBytes[i], decoded[i]);
+    }
+  }
+
+  @Test public void testBytePageEncode() throws MemoryException, IOException {
+    testBytePageEncode(data1.inputBytePage, data1.expectedEncodedByteData);
+    testBytePageEncode(data2.inputBytePage, data2.expectedEncodedByteData);
+    testBytePageEncode(data3.inputBytePage, data3.expectedEncodedByteData);
+  }
+
+  @Test public void testBytePageDecode() throws IOException, MemoryException {
+    testBytePageDecode(data1.expectedEncodedByteData, data1.inputByteData);
+    testBytePageDecode(data2.expectedEncodedByteData, data2.inputByteData);
+    testBytePageDecode(data3.expectedEncodedByteData, data3.inputByteData);
+  }
+
+  @AfterClass public static void tearDown() {
+  }
+}

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/core/src/test/java/org/apache/carbondata/core/dictionary/client/DictionaryClientTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/dictionary/client/DictionaryClientTest.java b/core/src/test/java/org/apache/carbondata/core/dictionary/client/DictionaryClientTest.java
index 4847177..edefd09 100644
--- a/core/src/test/java/org/apache/carbondata/core/dictionary/client/DictionaryClientTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/dictionary/client/DictionaryClientTest.java
@@ -72,7 +72,7 @@ public class DictionaryClientTest {
     empColumnSchema.setDimensionColumn(true);
     empColumnSchema.setDataType(DataTypes.STRING);
     empColumnSchema.setEncodingList(Arrays.asList(Encoding.DICTIONARY));
-    empDimension = new CarbonDimension(empColumnSchema, 0, 0, 0, 0, 0);
+    empDimension = new CarbonDimension(empColumnSchema, 0, 0, 0, 0);
 
     ageColumnSchema = new ColumnSchema();
     ageColumnSchema.setColumnName("ageNameCol");
@@ -80,7 +80,7 @@ public class DictionaryClientTest {
     ageColumnSchema.setColumnUniqueId("ageNameCol");
     ageColumnSchema.setDimensionColumn(true);
     ageColumnSchema.setEncodingList(Arrays.asList(Encoding.DICTIONARY));
-    ageDimension = new CarbonDimension(ageColumnSchema, 0, 0, 0, 0, 0);
+    ageDimension = new CarbonDimension(ageColumnSchema, 0, 0, 0, 0);
 
     // Create a Table
     tableSchema = new TableSchema();

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/core/src/test/java/org/apache/carbondata/core/dictionary/generator/IncrementalColumnDictionaryGeneratorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/dictionary/generator/IncrementalColumnDictionaryGeneratorTest.java b/core/src/test/java/org/apache/carbondata/core/dictionary/generator/IncrementalColumnDictionaryGeneratorTest.java
index 2d31fa5..ef06ac1 100644
--- a/core/src/test/java/org/apache/carbondata/core/dictionary/generator/IncrementalColumnDictionaryGeneratorTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/dictionary/generator/IncrementalColumnDictionaryGeneratorTest.java
@@ -62,7 +62,7 @@ public class IncrementalColumnDictionaryGeneratorTest {
     String storePath = System.getProperty("java.io.tmpdir") + "/tmp";
     tableInfo.setTablePath(storePath + "/test" + "/TestTable");
     carbonTable = CarbonTable.buildFromTableInfo(tableInfo);
-    carbonDimension = new CarbonDimension(columnSchema,0,0,0,0,0);
+    carbonDimension = new CarbonDimension(columnSchema,0,0,0,0);
   }
 
   @Test public void generateKeyOnce() throws Exception {
@@ -135,7 +135,7 @@ public class IncrementalColumnDictionaryGeneratorTest {
     columnSchema.setColumnName("empNameCol");
     columnSchema.setDataType(DataTypes.STRING);
     columnSchema.setColumnUniqueId("empNameCol");
-    CarbonDimension carbonDimension = new CarbonDimension(columnSchema, 0, 0, 0, 0, 0);
+    CarbonDimension carbonDimension = new CarbonDimension(columnSchema, 0, 0, 0, 0);
 
     // Create the generator and add the keys to dictionary
     IncrementalColumnDictionaryGenerator generator =

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/core/src/test/java/org/apache/carbondata/core/dictionary/generator/ServerDictionaryGeneratorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/dictionary/generator/ServerDictionaryGeneratorTest.java b/core/src/test/java/org/apache/carbondata/core/dictionary/generator/ServerDictionaryGeneratorTest.java
index 2564ead..5ff51cc 100644
--- a/core/src/test/java/org/apache/carbondata/core/dictionary/generator/ServerDictionaryGeneratorTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/dictionary/generator/ServerDictionaryGeneratorTest.java
@@ -65,7 +65,7 @@ public class ServerDictionaryGeneratorTest {
     empColumnSchema.setColumnUniqueId("empNameCol");
     empColumnSchema.setDimensionColumn(true);
     empColumnSchema.setEncodingList(Arrays.asList(Encoding.DICTIONARY));
-    empDimension = new CarbonDimension(empColumnSchema, 0, 0, 0, 0, 0);
+    empDimension = new CarbonDimension(empColumnSchema, 0, 0, 0,0);
 
     ageColumnSchema = new ColumnSchema();
     ageColumnSchema.setColumnName("empNameCol");
@@ -73,7 +73,7 @@ public class ServerDictionaryGeneratorTest {
     ageColumnSchema.setDataType(DataTypes.SHORT_INT);
     ageColumnSchema.setDimensionColumn(true);
     ageColumnSchema.setEncodingList(Arrays.asList(Encoding.DICTIONARY));
-    ageDimension = new CarbonDimension(ageColumnSchema, 0, 0, 0, 0, 0);
+    ageDimension = new CarbonDimension(ageColumnSchema, 0, 0, 0, 0);
 
     // Create a Table
     tableSchema = new TableSchema();

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/core/src/test/java/org/apache/carbondata/core/dictionary/generator/TableDictionaryGeneratorTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/dictionary/generator/TableDictionaryGeneratorTest.java b/core/src/test/java/org/apache/carbondata/core/dictionary/generator/TableDictionaryGeneratorTest.java
index e40bdad..96573bc 100644
--- a/core/src/test/java/org/apache/carbondata/core/dictionary/generator/TableDictionaryGeneratorTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/dictionary/generator/TableDictionaryGeneratorTest.java
@@ -65,7 +65,7 @@ public class TableDictionaryGeneratorTest {
     empColumnSchema.setDimensionColumn(true);
     empColumnSchema.setDataType(DataTypes.STRING);
     empColumnSchema.setEncodingList(Arrays.asList(Encoding.DICTIONARY));
-    empDimension = new CarbonDimension(empColumnSchema, 0, 0, 0, 0, 0);
+    empDimension = new CarbonDimension(empColumnSchema, 0, 0, 0, 0);
 
     ageColumnSchema = new ColumnSchema();
     ageColumnSchema.setDataType(DataTypes.SHORT_INT);
@@ -73,7 +73,7 @@ public class TableDictionaryGeneratorTest {
     ageColumnSchema.setColumnUniqueId("ageNameCol");
     ageColumnSchema.setDimensionColumn(true);
     ageColumnSchema.setEncodingList(Arrays.asList(Encoding.DICTIONARY));
-    ageDimension = new CarbonDimension(ageColumnSchema, 0, 0, 0, 0, 0);
+    ageDimension = new CarbonDimension(ageColumnSchema, 0, 0, 0, 0);
 
     // Create a Table
     tableSchema = new TableSchema();

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/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 fcef8f4..0ec19f2 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
@@ -117,7 +117,6 @@ public class CarbonMetadataTest {
 
   private static ColumnSchema getColumnarDimensionColumn() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -167,8 +166,8 @@ public class CarbonMetadataTest {
     ColumnSchema colSchema2 = new ColumnSchema();
     colSchema1.setColumnUniqueId("1");
     colSchema2.setColumnUniqueId("2");
-    carbonDimensions.add(new CarbonDimension(colSchema1, 1, 1, 2, 1));
-    carbonDimensions.add(new CarbonDimension(colSchema2, 2, 2, 2, 2));
+    carbonDimensions.add(new CarbonDimension(colSchema1, 1, 1, 1));
+    carbonDimensions.add(new CarbonDimension(colSchema2, 2, 2, 2));
     new MockUp<CarbonTable>() {
       @Mock public String getTableName() {
         return "carbonTestTable";
@@ -192,12 +191,12 @@ public class CarbonMetadataTest {
     ColumnSchema colSchema1 = new ColumnSchema();
     ColumnSchema colSchema2 = new ColumnSchema();
     colSchema1.setColumnUniqueId("1");
-    carbonDimensions.add(new CarbonDimension(colSchema1, 1, 1, 2, 1));
+    carbonDimensions.add(new CarbonDimension(colSchema1, 1, 1, 1));
     final List<CarbonDimension> carbonChildDimensions = new ArrayList();
     ColumnSchema colSchema3 = new ColumnSchema();
     colSchema3.setColumnUniqueId("9");
     colSchema2.setColumnUniqueId("2");
-    carbonChildDimensions.add(new CarbonDimension(colSchema3, 1, 1, 2, 1));
+    carbonChildDimensions.add(new CarbonDimension(colSchema3, 1, 1, 1));
     new MockUp<CarbonTable>() {
       @Mock public String getTableName() {
         return "carbonTestTable";
@@ -232,13 +231,13 @@ public class CarbonMetadataTest {
     ColumnSchema colSchema1 = new ColumnSchema();
     colSchema1.setColumnUniqueId("1");
     colSchema1.setNumberOfChild(1);
-    CarbonDimension carbonDimension = new CarbonDimension(colSchema1, 1, 1, 2, 1);
+    CarbonDimension carbonDimension = new CarbonDimension(colSchema1, 1, 1, 1);
     carbonDimensions.add(carbonDimension);
     final List<CarbonDimension> carbonChildDimensions = new ArrayList();
     ColumnSchema colSchema2 = new ColumnSchema();
     colSchema2.setColumnUniqueId("9");
     colSchema2.setNumberOfChild(0);
-    carbonChildDimensions.add(new CarbonDimension(colSchema2, 1, 1, 2, 1));
+    carbonChildDimensions.add(new CarbonDimension(colSchema2, 1, 1, 1));
 
     new MockUp<CarbonTable>() {
       @Mock public String getTableName() {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/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 522bf41..897c3cf 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
@@ -279,18 +279,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -363,18 +355,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -445,18 +429,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -521,18 +497,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -596,18 +564,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -670,18 +630,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -744,18 +696,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -819,18 +763,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -893,18 +829,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -973,18 +901,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -1047,18 +967,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -1122,18 +1034,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -1203,18 +1107,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -1277,18 +1173,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -1362,18 +1250,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -1480,18 +1360,10 @@ public class ThriftWrapperSchemaConverterImplTest {
         return "1";
       }
 
-      @Mock public boolean isColumnar() {
-        return true;
-      }
-
       @Mock public boolean isDimensionColumn() {
         return true;
       }
 
-      @Mock public int getColumnGroupId() {
-        return 1;
-      }
-
       @Mock public int getScale() {
         return 1;
       }
@@ -1566,12 +1438,10 @@ public class ThriftWrapperSchemaConverterImplTest {
     ColumnSchema wrapperColumnSchema = new ColumnSchema();
     wrapperColumnSchema.setColumnUniqueId("1");
     wrapperColumnSchema.setColumnName("columnName");
-    wrapperColumnSchema.setColumnar(true);
     wrapperColumnSchema.setDataType(DataTypes.STRING);
     wrapperColumnSchema.setDimensionColumn(true);
     wrapperColumnSchema.setEncodingList(encodings);
     wrapperColumnSchema.setNumberOfChild(1);
-    wrapperColumnSchema.setColumnGroup(1);
     wrapperColumnSchema.setDefaultValue(new byte[] { 1, 2 });
     wrapperColumnSchema.setColumnProperties(columnPropertyMap);
     wrapperColumnSchema.setInvisible(true);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/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 0266df4..ec1303f 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
@@ -64,13 +64,12 @@ public class CarbonTableTest extends TestCase {
   }
 
   @Test public void testDimensionPresentInTableIsProper() {
-    CarbonDimension dimension = new CarbonDimension(getColumnarDimensionColumn(), 0, -1, -1,-1);
+    CarbonDimension dimension = new CarbonDimension(getColumnarDimensionColumn(), 0, -1, -1);
     assertTrue(carbonTable.getDimensionByName("carbonTestTable", "IMEI").equals(dimension));
   }
 
   static ColumnSchema getColumnarDimensionColumn() {
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/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 84312cd..d3403d5 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
@@ -67,7 +67,6 @@ public class CarbonTableWithComplexTypesTest extends TestCase {
     List<ColumnSchema> cols = new ArrayList<ColumnSchema>();
 
     ColumnSchema dimColumn = new ColumnSchema();
-    dimColumn.setColumnar(true);
     dimColumn.setColumnName("IMEI");
     dimColumn.setColumnUniqueId(UUID.randomUUID().toString());
     dimColumn.setDataType(DataTypes.STRING);
@@ -80,7 +79,6 @@ public class CarbonTableWithComplexTypesTest extends TestCase {
     cols.add(dimColumn);
 
     ColumnSchema structColumn = new ColumnSchema();
-    structColumn.setColumnar(true);
     structColumn.setColumnName("mobile");
     structColumn.setColumnUniqueId(UUID.randomUUID().toString());
     structColumn.setDataType(DataTypes.createDefaultStructType());
@@ -90,7 +88,6 @@ public class CarbonTableWithComplexTypesTest extends TestCase {
     cols.add(structColumn);
 
     ColumnSchema primitiveColumn = new ColumnSchema();
-    primitiveColumn.setColumnar(true);
     primitiveColumn.setColumnName("mobile.stdcode");
     primitiveColumn.setColumnUniqueId(UUID.randomUUID().toString());
     primitiveColumn.setDataType(DataTypes.STRING);
@@ -100,7 +97,6 @@ public class CarbonTableWithComplexTypesTest extends TestCase {
     cols.add(primitiveColumn);
 
     ColumnSchema arrayColumn = new ColumnSchema();
-    arrayColumn.setColumnar(true);
     arrayColumn.setColumnName("mobile.val");
     arrayColumn.setColumnUniqueId(UUID.randomUUID().toString());
     arrayColumn.setDataType(DataTypes.createDefaultArrayType());
@@ -110,7 +106,6 @@ public class CarbonTableWithComplexTypesTest extends TestCase {
     cols.add(arrayColumn);
 
     ColumnSchema primitiveColumn1 = new ColumnSchema();
-    primitiveColumn1.setColumnar(true);
     primitiveColumn1.setColumnName("mobile.val.phoneno");
     primitiveColumn1.setColumnUniqueId(UUID.randomUUID().toString());
     primitiveColumn1.setDataType(DataTypes.STRING);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/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
deleted file mode 100644
index be91410..0000000
--- a/core/src/test/java/org/apache/carbondata/core/scan/collector/impl/RawBasedResultCollectorTest.java
+++ /dev/null
@@ -1,130 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.carbondata.core.scan.collector.impl;
-
-import static org.hamcrest.CoreMatchers.is;
-import static org.hamcrest.MatcherAssert.assertThat;
-
-public class RawBasedResultCollectorTest {
-//
-//  private static RawBasedResultCollector rawBasedResultCollector;
-//  private static BlockExecutionInfo blockExecutionInfo;
-//  private static KeyGenerator keyGenerator;
-//
-//  @BeforeClass public static void setUp() {
-//    keyGenerator = new MockUp<KeyGenerator>() {
-//      @SuppressWarnings("unused") @Mock long[] getKeyArray(byte[] key, int[] maskedByteRanges) {
-//        return new long[] { 1, 2 };
-//      }
-//
-//      @SuppressWarnings("unused") @Mock byte[] generateKey(long[] keys) throws KeyGenException {
-//        return new byte[] { 1, 2 };
-//      }
-//
-//    }.getMockInstance();
-//
-//    blockExecutionInfo = new BlockExecutionInfo();
-//    KeyStructureInfo keyStructureInfo = new KeyStructureInfo();
-//    keyStructureInfo.setKeyGenerator(keyGenerator);
-//    keyStructureInfo.setMaxKey(new byte[] { 1, 2 });
-//    keyStructureInfo.setMaskedBytes(new int[] { 1, 2 });
-//    keyStructureInfo.setMaskByteRanges(new int[] { 1, 2 });
-//    blockExecutionInfo.setKeyStructureInfo(keyStructureInfo);
-//    MeasureInfo aggregatorInfo = new MeasureInfo();
-//    aggregatorInfo.setMeasureOrdinals(new int[] { 10, 20, 30, 40 });
-//    aggregatorInfo.setMeasureExists(new boolean[] { true, false, false, false });
-//    aggregatorInfo.setDefaultValues(new Object[] { 1, 2, 3, 4 });
-//    aggregatorInfo.setMeasureDataTypes(
-//        new DataType[] { DataTypes.INT, DataTypes.TIMESTAMP, DataTypes.INT, DataTypes.INT });
-//    ProjectionMeasure queryMeasure1 = new ProjectionMeasure("QMCol1");
-//    queryMeasure1.setQueryOrder(1);
-//    ProjectionMeasure queryMeasure2 = new ProjectionMeasure("QMCol2");
-//    queryMeasure1.setQueryOrder(2);
-//    ProjectionMeasure queryMeasure3 = new ProjectionMeasure("QMCol3");
-//    queryMeasure1.setQueryOrder(3);
-//    ProjectionMeasure queryMeasure4 = new ProjectionMeasure("QMCol4");
-//    queryMeasure1.setQueryOrder(4);
-//    ProjectionDimension queryDimension1 = new ProjectionDimension("QDCol1");
-//    queryDimension1.setQueryOrder(1);
-//    ColumnSchema columnSchema = new ColumnSchema();
-//    queryDimension1.setDimension(new CarbonDimension(columnSchema, 0, 0, 0, 0));
-//    ProjectionDimension queryDimension2 = new ProjectionDimension("QDCol2");
-//    queryDimension2.setQueryOrder(2);
-//    queryDimension2.setDimension(new CarbonDimension(columnSchema, 1, 1, 1, 1));
-//    ProjectionDimension queryDimension3 = new ProjectionDimension("QDCol3");
-//    queryDimension3.setQueryOrder(3);
-//    queryDimension3.setDimension(new CarbonDimension(columnSchema, 2, 0, 0, 0));
-//    ProjectionDimension queryDimension4 = new ProjectionDimension("QDCol4");
-//    queryDimension4.setQueryOrder(4);
-//    queryDimension4.setDimension(new CarbonDimension(columnSchema, 3, 0, 0, 0));
-//    blockExecutionInfo.setProjectionDimensions(
-//        new ProjectionDimension[] { queryDimension1, queryDimension2, queryDimension3,
-//            queryDimension4 });
-//    blockExecutionInfo.setProjectionMeasures(
-//        new ProjectionMeasure[] { queryMeasure1, queryMeasure2, queryMeasure3, queryMeasure4 });
-//    blockExecutionInfo.setFixedKeyUpdateRequired(true);
-//    blockExecutionInfo.setMeasureInfo(aggregatorInfo);
-//    blockExecutionInfo.setMaskedByteForBlock(new int[] { 1, 2 });
-//    blockExecutionInfo.setBlockKeyGenerator(keyGenerator);
-//    rawBasedResultCollector = new RawBasedResultCollector(blockExecutionInfo);
-//  }
-//
-//  @Test public void testToCollectData() {
-//
-//    new MockUp<NonFilterQueryScannedResult>() {
-//      @SuppressWarnings("unused") @Mock byte[] getDictionaryKeyArray() {
-//        this.getMockInstance().incrementCounter();
-//        return new byte[] { 1, 2 };
-//      }
-//
-//      @SuppressWarnings("unused") @Mock byte[][] getNoDictionaryKeyArray() {
-//        return new byte[][] { { 1, 2 } };
-//      }
-//
-//      @SuppressWarnings("unused") @Mock byte[][] getComplexTypeKeyArray() {
-//        return new byte[][] { { 1, 2 }, { 1, 2 } };
-//      }
-//
-//      @SuppressWarnings("unused") @Mock public ColumnPage readMeasureChunk(int ordinal) {
-//        ColumnPage ColumnPage = new ColumnPage();
-//        PresenceMeta presenceMeta = new PresenceMeta();
-//        BitSet bitSet = new BitSet();
-//        bitSet.set(1);
-//        presenceMeta.setBitSet(bitSet);
-//        ColumnPage.setNullValueIndexHolder(presenceMeta);
-//        CarbonReadDataHolder carbonReadDataHolder = new CarbonReadDataHolder();
-//        carbonReadDataHolder.setReadableLongValues(new long[] { 1 });
-//        ColumnPage.setColumnPage(carbonReadDataHolder);
-//        return ColumnPage;
-//      }
-//    };
-//
-//    new MockUp<QueryUtil>() {
-//      @SuppressWarnings("unused") @Mock byte[] getMaskedKey(byte[] data, byte[] maxKey,
-//          int[] maskByteRanges, int byteCount) {
-//        return new byte[] { 1, 2 };
-//      }
-//    };
-//
-//    BlockletScannedResult abstractScannedResult =
-//        new NonFilterQueryScannedResult(blockExecutionInfo);
-//    abstractScannedResult.setPageFilteredRowCount(2);
-//    List<Object[]> result = rawBasedResultCollector.collectResultInRow(abstractScannedResult, 2);
-//    int expectedResult = 2;
-//    assertThat(result.size(), is(equalTo(expectedResult)));
-//  }
-}

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/core/src/test/java/org/apache/carbondata/core/scan/executor/util/QueryUtilTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/executor/util/QueryUtilTest.java b/core/src/test/java/org/apache/carbondata/core/scan/executor/util/QueryUtilTest.java
index e8b75b7..2c9d132 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/executor/util/QueryUtilTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/executor/util/QueryUtilTest.java
@@ -141,42 +141,6 @@ public class QueryUtilTest extends TestCase {
     Assert.assertTrue(result);
   }
 
-  @Test public void testGetColumnGroupIdWhenOrdinalValueNotPresentInArrayIndex() {
-    int ordinal = 0;
-    new MockUp<SegmentProperties>() {
-      @Mock public int[][] getColumnGroups() {
-        return new int[][] { { 1, 1 }, { 2, 2 }, { 3, 3 }, { 4, 4 }, { 5, 5 } };
-      }
-    };
-    int actualValue = QueryUtil.getColumnGroupId(segmentProperties, ordinal);
-    int expectedValue = 4; //expectedValue will always be arrayLength - 1
-    assertEquals(expectedValue, actualValue);
-  }
-
-  @Test public void testGetColumnGroupIdWhenOrdinalValuePresentInArrayIndex() {
-    int ordinal = 1;
-    new MockUp<SegmentProperties>() {
-      @Mock public int[][] getColumnGroups() {
-        return new int[][] { { 1, 1 }, { 2, 2 }, { 3, 3 }, { 4, 4 }, { 5, 5 } };
-      }
-    };
-    int actualValue = QueryUtil.getColumnGroupId(segmentProperties, ordinal);
-    int expectedValue = 0;
-    assertEquals(expectedValue, actualValue);
-  }
-
-  @Test public void testGetColumnGroupIdWhenColumnGroupsIndexValueLengthLessThanOne() {
-    int ordinal = 1;
-    new MockUp<SegmentProperties>() {
-      @Mock public int[][] getColumnGroups() {
-        return new int[][] { { 1 } };
-      }
-    };
-    int actualValue = QueryUtil.getColumnGroupId(segmentProperties, ordinal);
-    int expectedValue = -1;
-    assertEquals(expectedValue, actualValue);
-  }
-
   @Test public void testGetMaskedKey() {
     byte[] data = { 1, 2, 3, 4, 5, 5 };
     byte[] maxKey = { 15, 20, 25, 30, 35, 35 };

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/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 2768e93..7332614 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
@@ -69,19 +69,19 @@ public class RestructureUtilTest {
     columnSchema5.setColumnUniqueId(UUID.randomUUID().toString());
     columnSchema5.setEncodingList(encodingList);
 
-    CarbonDimension tableBlockDimension1 = new CarbonDimension(columnSchema1, 1, 1, 1, 1);
-    CarbonDimension tableBlockDimension2 = new CarbonDimension(columnSchema2, 5, 5, 5, 5);
+    CarbonDimension tableBlockDimension1 = new CarbonDimension(columnSchema1, 1, 1, 1);
+    CarbonDimension tableBlockDimension2 = new CarbonDimension(columnSchema2, 5, 5, 5);
     List<CarbonDimension> tableBlockDimensions =
         Arrays.asList(tableBlockDimension1, tableBlockDimension2);
 
-    CarbonDimension tableComplexDimension1 = new CarbonDimension(columnSchema3, 4, 4, 4, 4);
-    CarbonDimension tableComplexDimension2 = new CarbonDimension(columnSchema4, 2, 2, 2, 2);
+    CarbonDimension tableComplexDimension1 = new CarbonDimension(columnSchema3, 4, 4, 4);
+    CarbonDimension tableComplexDimension2 = new CarbonDimension(columnSchema4, 2, 2, 2);
     List<CarbonDimension> tableComplexDimensions =
         Arrays.asList(tableComplexDimension1, tableComplexDimension2);
 
     ProjectionDimension queryDimension1 = new ProjectionDimension(tableBlockDimension1);
     ProjectionDimension queryDimension2 = new ProjectionDimension(tableComplexDimension2);
-    ProjectionDimension queryDimension3 = new ProjectionDimension(new CarbonDimension(columnSchema5, 3, 3, 3, 3));
+    ProjectionDimension queryDimension3 = new ProjectionDimension(new CarbonDimension(columnSchema5, 3, 3, 3));
     ProjectionMeasure queryMeasure1 = new ProjectionMeasure(new CarbonMeasure(columnSchema3, 2));
     ProjectionMeasure queryMeasure2 = new ProjectionMeasure(new CarbonMeasure(columnSchema4, 4));
     List<ProjectionMeasure> queryMeasures = Arrays.asList(queryMeasure1, queryMeasure2);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/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 f2147b2..fea8db0 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
@@ -48,6 +48,7 @@ public class ColumnExpressionTest {
     };
     ExpressionResult expectedValue = new ExpressionResult(DataTypes.INT, 1);
     assertEquals(expectedValue, columnExpression.evaluate(rowImpl));
+    assertEquals(1, rowImpl.size());
   }
 
   @Test public void testEvaluateForNullValue() {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpressionUnitTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpressionUnitTest.java b/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpressionUnitTest.java
index f349fc9..7b20f8a 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpressionUnitTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/EqualToExpressionUnitTest.java
@@ -42,6 +42,8 @@ public class EqualToExpressionUnitTest {
 
   static EqualToExpression equalToExpression;
 
+  static int i = 0;
+
   @Test public void testForEqualToExpressionWithGetString() throws Exception {
     ColumnExpression right = new ColumnExpression("name", DataTypes.STRING);
     right.setColIndex(0);
@@ -236,6 +238,29 @@ public class EqualToExpressionUnitTest {
     assertTrue(result.getBoolean());
   }
 
+  @Test public void testEvaluateForEqualToExpressionWithLeftAndRightDifferentDataType1()
+      throws FilterUnsupportedException, FilterIllegalMemberException {
+    ColumnExpression left = new ColumnExpression("name", DataTypes.INT);
+    left.setColIndex(0);
+    ColumnExpression right = new ColumnExpression("number", DataTypes.STRING);
+    right.setColIndex(0);
+    equalToExpression = new EqualToExpression(left, right);
+    RowImpl value = new RowImpl();
+    String[] row1 = { "String1" };
+    Integer[] row = { 14 };
+    Object objectRow[] = { row1, row };
+    value.setValues(objectRow);
+
+    new MockUp<ExpressionResult>() {
+      @Mock public Integer getInt() {
+        return 14;
+      }
+    };
+
+    ExpressionResult result = equalToExpression.evaluate(value);
+    assertTrue(result.getBoolean());
+  }
+
   @Test public void testEvaluateForEqualToExpressionWithIsNullReturnFalse()
       throws FilterUnsupportedException, FilterIllegalMemberException {
     ColumnExpression right = new ColumnExpression("id", DataTypes.SHORT);
@@ -309,4 +334,30 @@ public class EqualToExpressionUnitTest {
     ExpressionResult result = equalToExpression.evaluate(value);
     assertTrue(result.getBoolean());
   }
+
+  @Test public void testEvaluateForEqualToExpressionWithDecimalDataType1()
+      throws FilterUnsupportedException, FilterIllegalMemberException {
+    ColumnExpression right = new ColumnExpression("contact", DataTypes.createDefaultDecimalType());
+    right.setColIndex(0);
+    equalToExpression = new EqualToExpression(right, right);
+    RowImpl value = new RowImpl();
+    BigDecimal[] row = new BigDecimal[] { new BigDecimal(12345.0) };
+    BigDecimal[] row1 = new BigDecimal[] { new BigDecimal(12346.0) };
+    Object objectRow[] = { row, row1 };
+    value.setValues(objectRow);
+
+    new MockUp<ExpressionResult>() {
+      @Mock public BigDecimal getDecimal() {
+        if (i == 0) {
+          i++;
+          return new BigDecimal(12346.0);
+        } else {
+          return new BigDecimal(12345.0);
+        }
+      }
+    };
+
+    ExpressionResult result = equalToExpression.evaluate(value);
+    assertFalse(result.getBoolean());
+  }
 }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/f9114036/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanEqualToExpressionUnitTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanEqualToExpressionUnitTest.java b/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanEqualToExpressionUnitTest.java
index 95e5935..20e077a 100644
--- a/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanEqualToExpressionUnitTest.java
+++ b/core/src/test/java/org/apache/carbondata/core/scan/expression/conditional/GreaterThanEqualToExpressionUnitTest.java
@@ -88,6 +88,35 @@ public class GreaterThanEqualToExpressionUnitTest {
 
   }
 
+  @Test public void testEvaluateForGreaterThanEqualToExpressionWithShortDataType1()
+      throws FilterUnsupportedException, FilterIllegalMemberException {
+    ColumnExpression right = new ColumnExpression("id", DataTypes.SHORT);
+    right.setColIndex(0);
+    ColumnExpression left = new ColumnExpression("id", DataTypes.SHORT);
+    left.setColIndex(1);
+    greaterThanEqualToExpression = new GreaterThanEqualToExpression(left, right);
+    RowImpl value = new RowImpl();
+    Short[] row = { 15 };
+    Short[] row1 = { 16 };
+    Object objectRow[] = { row1, row };
+    value.setValues(objectRow);
+
+    new MockUp<ExpressionResult>() {
+      boolean isFirst = true;
+      @Mock public Short getShort() {
+        if (isFirst) {
+          isFirst = false;
+          return 15;
+        }
+        return 16;
+      }
+    };
+
+    ExpressionResult result = greaterThanEqualToExpression.evaluate(value);
+    assertFalse(result.getBoolean());
+
+  }
+
   @Test public void testEvaluateForGreaterThanEqualToExpressionWithIntDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
     ColumnExpression right = new ColumnExpression("right_number", DataTypes.INT);
@@ -111,6 +140,34 @@ public class GreaterThanEqualToExpressionUnitTest {
     assertTrue(result.getBoolean());
   }
 
+  @Test public void testEvaluateForGreaterThanEqualToExpressionWithIntDataType1()
+      throws FilterUnsupportedException, FilterIllegalMemberException {
+    ColumnExpression right = new ColumnExpression("right_number", DataTypes.INT);
+    right.setColIndex(0);
+    ColumnExpression left = new ColumnExpression("left_number", DataTypes.INT);
+    left.setColIndex(1);
+    greaterThanEqualToExpression = new GreaterThanEqualToExpression(left, right);
+    RowImpl value = new RowImpl();
+    Integer[] row = { 140 };
+    Integer[] row1 = { 145 };
+    Object objectRow[] = { row1, row };
+    value.setValues(objectRow);
+
+    new MockUp<ExpressionResult>() {
+      boolean isFirst = true;
+      @Mock public Integer getInt() {
+        if (isFirst) {
+          isFirst = false;
+          return 140;
+        }
+        return 145;
+      }
+    };
+
+    ExpressionResult result = greaterThanEqualToExpression.evaluate(value);
+    assertFalse(result.getBoolean());
+  }
+
   @Test public void testEvaluateForGreaterThanEqualToExpressionWithDoubleDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
     ColumnExpression right = new ColumnExpression("right_contact", DataTypes.DOUBLE);
@@ -134,6 +191,34 @@ public class GreaterThanEqualToExpressionUnitTest {
     assertTrue(result.getBoolean());
   }
 
+  @Test public void testEvaluateForGreaterThanEqualToExpressionWithDoubleDataType1()
+      throws FilterUnsupportedException, FilterIllegalMemberException {
+    ColumnExpression right = new ColumnExpression("right_contact", DataTypes.DOUBLE);
+    right.setColIndex(0);
+    ColumnExpression left = new ColumnExpression("left_contact", DataTypes.DOUBLE);
+    left.setColIndex(1);
+    greaterThanEqualToExpression = new GreaterThanEqualToExpression(left, right);
+    RowImpl value = new RowImpl();
+    Double[] row = { 44D };
+    Double[] row1 = { 45D };
+    Object objectRow[] = { row1, row };
+    value.setValues(objectRow);
+
+    new MockUp<ExpressionResult>() {
+      boolean isFirst = true;
+      @Mock public Double getDouble() {
+        if (isFirst) {
+          isFirst = false;
+          return 44D;
+        }
+        return 45D;
+      }
+    };
+
+    ExpressionResult result = greaterThanEqualToExpression.evaluate(value);
+    assertFalse(result.getBoolean());
+  }
+
   @Test public void testEvaluateForGreaterThanEqualToExpressionWithLongDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
     ColumnExpression right = new ColumnExpression("contact", DataTypes.LONG);
@@ -157,6 +242,34 @@ public class GreaterThanEqualToExpressionUnitTest {
     assertTrue(result.getBoolean());
   }
 
+  @Test public void testEvaluateForGreaterThanEqualToExpressionWithLongDataType1()
+      throws FilterUnsupportedException, FilterIllegalMemberException {
+    ColumnExpression right = new ColumnExpression("contact", DataTypes.LONG);
+    right.setColIndex(0);
+    ColumnExpression left = new ColumnExpression("contact", DataTypes.LONG);
+    left.setColIndex(1);
+    greaterThanEqualToExpression = new GreaterThanEqualToExpression(left, right);
+    RowImpl value = new RowImpl();
+    Long[] row = { 1234567654321L };
+    Long[] row1 = { 1234567654321L };
+    Object objectRow[] = { row1, row };
+    value.setValues(objectRow);
+
+    new MockUp<ExpressionResult>() {
+      boolean isFirst = true;
+      @Mock public Long getLong() {
+        if (isFirst) {
+          isFirst = false;
+          return 1234567654322L;
+        }
+        return 1234567654321L;
+      }
+    };
+
+    ExpressionResult result = greaterThanEqualToExpression.evaluate(value);
+    assertTrue(result.getBoolean());
+  }
+
   @Test public void testEvaluateForGreaterThanEqualToExpressionWithTimestampDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
     try {
@@ -187,6 +300,41 @@ public class GreaterThanEqualToExpressionUnitTest {
     }
   }
 
+  @Test public void testEvaluateForGreaterThanEqualToExpressionWithTimestampDataType1()
+      throws FilterUnsupportedException, FilterIllegalMemberException {
+    try {
+      ColumnExpression left = new ColumnExpression("timestamp", DataTypes.TIMESTAMP);
+      left.setColIndex(0);
+      ColumnExpression right = new ColumnExpression("timestamp", DataTypes.TIMESTAMP);
+      right.setColIndex(1);
+      greaterThanEqualToExpression = new GreaterThanEqualToExpression(left, right);
+      RowImpl value = new RowImpl();
+      DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy");
+      Date date = dateFormat.parse("23/09/2007");
+      long time = date.getTime();
+      Timestamp[] row = { new Timestamp(time) };
+      Timestamp[] row1 = { new Timestamp(time) };
+      Object objectRow[] = { row, row1 };
+      value.setValues(objectRow);
+
+      new MockUp<ExpressionResult>() {
+        boolean isFirst = true;
+        @Mock public Long getTime() {
+          if (isFirst) {
+            isFirst = false;
+            return 1190505600L;
+          }
+          return 18465213000000L;
+        }
+      };
+
+      ExpressionResult result = greaterThanEqualToExpression.evaluate(value);
+      assertFalse(result.getBoolean());
+    } catch (ParseException e) {
+      System.out.println("Error while parsing " + e.getMessage());
+    }
+  }
+
   @Test public void testForGreaterThanEqualToExpressionWithDefaultCase()
       throws FilterUnsupportedException, FilterIllegalMemberException {
     ColumnExpression right = new ColumnExpression("contact", DataTypes.BOOLEAN);
@@ -252,6 +400,40 @@ public class GreaterThanEqualToExpressionUnitTest {
 
   }
 
+  @Test public void testEvaluateForGreaterThanEqualToExpressionWithIsNullReturnTrue1()
+      throws FilterUnsupportedException, FilterIllegalMemberException {
+    ColumnExpression left = new ColumnExpression("id", DataTypes.SHORT);
+    left.setColIndex(0);
+    ColumnExpression right = new ColumnExpression("id", DataTypes.SHORT);
+    right.setColIndex(1);
+    greaterThanEqualToExpression = new GreaterThanEqualToExpression(left, right);
+    RowImpl value = new RowImpl();
+    Short[] row = { 15 };
+    Object objectRow[] = { row, row };
+    value.setValues(objectRow);
+
+    new MockUp<ExpressionResult>() {
+      boolean isFirst = true;
+      @Mock public boolean isNull() {
+        if (isFirst) {
+          isFirst = false;
+          return false;
+        }
+        return true;
+      }
+    };
+
+    new MockUp<ExpressionResult>() {
+      @Mock public Short getShort() {
+        return 15;
+      }
+    };
+
+    ExpressionResult result = greaterThanEqualToExpression.evaluate(value);
+    assertFalse(result.getBoolean());
+
+  }
+
   @Test public void testEvaluateForGreaterThanEqualToExpressionWithLeftAndRightDifferentDataType()
       throws FilterUnsupportedException, FilterIllegalMemberException {
     ColumnExpression left = new ColumnExpression("name", DataTypes.STRING);
@@ -275,6 +457,29 @@ public class GreaterThanEqualToExpressionUnitTest {
     assertTrue(result.getBoolean());
   }
 
+  @Test public void testEvaluateForGreaterThanEqualToExpressionWithLeftAndRightDifferentDataType1()
+      throws FilterUnsupportedException, FilterIllegalMemberException {
+    ColumnExpression left = new ColumnExpression("name", DataTypes.INT);
+    left.setColIndex(1);
+    ColumnExpression right = new ColumnExpression("number", DataTypes.STRING);
+    right.setColIndex(0);
+    greaterThanEqualToExpression = new GreaterThanEqualToExpression(left, right);
+    RowImpl value = new RowImpl();
+    String[] row1 = { "String1" };
+    Integer[] row = { 14 };
+    Object objectRow[] = { row1, row };
+    value.setValues(objectRow);
+
+    new MockUp<ExpressionResult>() {
+      @Mock public Integer getInt() {
+        return 14;
+      }
+    };
+
+    ExpressionResult result = greaterThanEqualToExpression.evaluate(value);
+    assertTrue(result.getBoolean());
+  }
+
   @Test public void testForGreaterThanEqualToExpressionWithGetString() throws Exception {
     ColumnExpression left = new ColumnExpression("left_name", DataTypes.STRING);
     left.setColIndex(0);


Mime
View raw message