carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jack...@apache.org
Subject [19/57] [abbrv] incubator-carbondata git commit: move org.apache.carbon.common in core
Date Sat, 14 Jan 2017 07:57:28 GMT
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/update/data/BlockletLevelDeleteDeltaDataCache.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/update/data/BlockletLevelDeleteDeltaDataCache.java b/core/src/main/java/org/apache/carbondata/core/update/data/BlockletLevelDeleteDeltaDataCache.java
new file mode 100644
index 0000000..5b453cc
--- /dev/null
+++ b/core/src/main/java/org/apache/carbondata/core/update/data/BlockletLevelDeleteDeltaDataCache.java
@@ -0,0 +1,46 @@
+/*
+ * 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.update.data;
+
+import org.roaringbitmap.RoaringBitmap;
+
+/**
+ * This class maintains delete delta data cache of each blocklet along with the block timestamp
+ */
+public class BlockletLevelDeleteDeltaDataCache {
+  private RoaringBitmap deleteDelataDataCache;
+  private String timeStamp;
+
+  public BlockletLevelDeleteDeltaDataCache(int[] deleteDeltaFileData, String timeStamp) {
+    deleteDelataDataCache = RoaringBitmap.bitmapOf(deleteDeltaFileData);
+    this.timeStamp=timeStamp;
+  }
+
+  public boolean contains(int key) {
+    return deleteDelataDataCache.contains(key);
+  }
+
+  public int getSize() {
+    return deleteDelataDataCache.getCardinality();
+  }
+
+  public String getCacheTimeStamp() {
+    return timeStamp;
+  }
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/update/data/DeleteDeltaCacheLoaderIntf.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/update/data/DeleteDeltaCacheLoaderIntf.java b/core/src/main/java/org/apache/carbondata/core/update/data/DeleteDeltaCacheLoaderIntf.java
new file mode 100644
index 0000000..813d843
--- /dev/null
+++ b/core/src/main/java/org/apache/carbondata/core/update/data/DeleteDeltaCacheLoaderIntf.java
@@ -0,0 +1,27 @@
+/*
+ * 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.update.data;
+
+/**
+ * This interface holds all methods required to load delete delta file data to cache
+ */
+public interface DeleteDeltaCacheLoaderIntf {
+
+  void loadDeleteDeltaFileDataToCache();
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/update/data/RowCountDetailsVO.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/update/data/RowCountDetailsVO.java b/core/src/main/java/org/apache/carbondata/core/update/data/RowCountDetailsVO.java
new file mode 100644
index 0000000..15e33ad
--- /dev/null
+++ b/core/src/main/java/org/apache/carbondata/core/update/data/RowCountDetailsVO.java
@@ -0,0 +1,68 @@
+/*
+ * 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.update.data;
+
+import java.io.Serializable;
+
+/**
+ * VO class Details for block.
+ */
+public class RowCountDetailsVO implements Serializable {
+
+  private static final long serialVersionUID = 1206104914918491749L;
+
+  private long totalNumberOfRows;
+
+  private long deletedRowsInBlock;
+
+  public RowCountDetailsVO(long totalNumberOfRows, long deletedRowsInBlock) {
+    this.totalNumberOfRows = totalNumberOfRows;
+    this.deletedRowsInBlock = deletedRowsInBlock;
+  }
+
+  public long getTotalNumberOfRows() {
+    return totalNumberOfRows;
+  }
+
+  public long getDeletedRowsInBlock() {
+    return deletedRowsInBlock;
+  }
+
+  @Override public boolean equals(Object obj) {
+    if (this == obj) {
+      return true;
+    }
+    if (obj == null || getClass() != obj.getClass()) {
+      return false;
+    }
+
+    RowCountDetailsVO that = (RowCountDetailsVO) obj;
+
+    if (totalNumberOfRows != that.totalNumberOfRows) {
+      return false;
+    }
+    return deletedRowsInBlock == that.deletedRowsInBlock;
+
+  }
+
+  @Override public int hashCode() {
+    int result = (int) (totalNumberOfRows ^ (totalNumberOfRows >>> 32));
+    result = 31 * result + (int) (deletedRowsInBlock ^ (deletedRowsInBlock >>> 32));
+    return result;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/update/data/UpdateVO.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/update/data/UpdateVO.java b/core/src/main/java/org/apache/carbondata/core/update/data/UpdateVO.java
new file mode 100644
index 0000000..d4f01b2
--- /dev/null
+++ b/core/src/main/java/org/apache/carbondata/core/update/data/UpdateVO.java
@@ -0,0 +1,108 @@
+/*
+ * 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.update.data;
+
+import java.io.Serializable;
+
+/**
+ * VO class for storing details related to Update operation.
+ */
+public class UpdateVO implements Serializable {
+  private static final long serialVersionUID = 1L;
+
+  private Long factTimestamp;
+
+  private Long updateDeltaStartTimestamp;
+
+  private String segmentId;
+
+  public Long getLatestUpdateTimestamp() {
+    return latestUpdateTimestamp;
+  }
+
+  public void setLatestUpdateTimestamp(Long latestUpdateTimestamp) {
+    this.latestUpdateTimestamp = latestUpdateTimestamp;
+  }
+
+  private Long latestUpdateTimestamp;
+
+  public Long getFactTimestamp() {
+    return factTimestamp;
+  }
+
+  public void setFactTimestamp(Long factTimestamp) {
+    this.factTimestamp = factTimestamp;
+  }
+
+  public Long getUpdateDeltaStartTimestamp() {
+    return updateDeltaStartTimestamp;
+  }
+
+  public void setUpdateDeltaStartTimestamp(Long updateDeltaStartTimestamp) {
+    this.updateDeltaStartTimestamp = updateDeltaStartTimestamp;
+  }
+
+  @Override public boolean equals(Object o) {
+    if (this == o) return true;
+    if (o == null || getClass() != o.getClass()) return false;
+    UpdateVO updateVO = (UpdateVO) o;
+    if (factTimestamp != null ?
+        !factTimestamp.equals(updateVO.factTimestamp) :
+        updateVO.factTimestamp != null) {
+      return false;
+    }
+    if (updateDeltaStartTimestamp != null ?
+        !updateDeltaStartTimestamp.equals(updateVO.updateDeltaStartTimestamp) :
+        updateVO.updateDeltaStartTimestamp != null) {
+      return false;
+    }
+    return latestUpdateTimestamp != null ?
+        latestUpdateTimestamp.equals(updateVO.latestUpdateTimestamp) :
+        updateVO.latestUpdateTimestamp == null;
+
+  }
+
+  @Override public int hashCode() {
+    int result = factTimestamp != null ? factTimestamp.hashCode() : 0;
+    result = 31 * result + (updateDeltaStartTimestamp != null ?
+        updateDeltaStartTimestamp.hashCode() :
+        0);
+    result = 31 * result + (latestUpdateTimestamp != null ? latestUpdateTimestamp.hashCode() : 0);
+    return result;
+  }
+
+  /**
+   * This will return the update timestamp if its present or it will return the fact timestamp.
+   * @return
+   */
+  public Long getCreatedOrUpdatedTimeStamp() {
+    if (null == latestUpdateTimestamp) {
+      return factTimestamp;
+    }
+    return latestUpdateTimestamp;
+  }
+
+  public String getSegmentId() {
+    return segmentId;
+  }
+
+  public void setSegmentId(String segmentId) {
+    this.segmentId = segmentId;
+  }
+}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentStatusManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentStatusManager.java b/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentStatusManager.java
index 436e9b5..02c0860 100644
--- a/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentStatusManager.java
+++ b/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentStatusManager.java
@@ -31,7 +31,7 @@ import org.apache.carbondata.core.CarbonTableIdentifier;
 import org.apache.carbondata.core.path.CarbonStorePath;
 import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.load.LoadMetadataDetails;
 import org.apache.carbondata.core.update.CarbonUpdateUtil;
 import org.apache.carbondata.core.util.CarbonUtil;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentUpdateStatusManager.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentUpdateStatusManager.java b/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentUpdateStatusManager.java
index 5523925..c283012 100644
--- a/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentUpdateStatusManager.java
+++ b/core/src/main/java/org/apache/carbondata/core/updatestatus/SegmentUpdateStatusManager.java
@@ -29,15 +29,15 @@ import org.apache.carbondata.core.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.path.CarbonStorePath;
 import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.store.filesystem.CarbonFile;
-import org.apache.carbondata.core.datastorage.store.filesystem.CarbonFileFilter;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
+import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
+import org.apache.carbondata.core.datastorage.filesystem.CarbonFileFilter;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.load.LoadMetadataDetails;
 import org.apache.carbondata.core.reader.CarbonDeleteFilesDataReader;
 import org.apache.carbondata.core.update.CarbonUpdateUtil;
 import org.apache.carbondata.core.update.SegmentUpdateDetails;
 import org.apache.carbondata.core.update.TupleIdEnum;
-import org.apache.carbondata.core.update.UpdateVO;
+import org.apache.carbondata.core.update.data.UpdateVO;
 import org.apache.carbondata.core.util.CarbonUtil;
 import org.apache.carbondata.fileoperations.AtomicFileOperations;
 import org.apache.carbondata.fileoperations.AtomicFileOperationsImpl;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java b/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
index e43af48..360fd6f 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/CarbonMetadataUtil.java
@@ -34,8 +34,8 @@ import org.apache.carbondata.core.ColumnarFormatVersion;
 import org.apache.carbondata.core.datastore.block.SegmentProperties;
 import org.apache.carbondata.core.metadata.index.BlockIndexInfo;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.store.compression.CompressorFactory;
-import org.apache.carbondata.core.datastorage.store.compression.WriterCompressModel;
+import org.apache.carbondata.core.datastorage.compression.CompressorFactory;
+import org.apache.carbondata.core.datastorage.compression.WriterCompressModel;
 import org.apache.carbondata.core.metadata.BlockletInfoColumnar;
 import org.apache.carbondata.core.metadata.ValueEncoderMeta;
 import org.apache.carbondata.format.BlockIndex;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java b/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
index 04a863d..2a4fb1b 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/CarbonUtil.java
@@ -40,7 +40,7 @@ import java.util.HashSet;
 import java.util.List;
 import java.util.Set;
 
-import org.apache.carbondata.common.factory.CarbonCommonFactory;
+import org.apache.carbondata.core.service.CarbonCommonFactory;
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.AbsoluteTableIdentifier;
@@ -54,13 +54,13 @@ import org.apache.carbondata.core.datastore.chunk.impl.FixedLengthDimensionDataC
 import org.apache.carbondata.core.path.CarbonStorePath;
 import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.store.FileHolder;
-import org.apache.carbondata.core.datastorage.store.columnar.ColumnGroupModel;
-import org.apache.carbondata.core.datastorage.store.columnar.UnBlockIndexer;
-import org.apache.carbondata.core.datastorage.store.compression.MeasureMetaDataModel;
-import org.apache.carbondata.core.datastorage.store.compression.WriterCompressModel;
-import org.apache.carbondata.core.datastorage.store.filesystem.CarbonFile;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
+import org.apache.carbondata.core.datastorage.FileHolder;
+import org.apache.carbondata.core.datastorage.columnar.ColumnGroupModel;
+import org.apache.carbondata.core.datastorage.columnar.UnBlockIndexer;
+import org.apache.carbondata.core.datastorage.compression.MeasureMetaDataModel;
+import org.apache.carbondata.core.datastorage.compression.WriterCompressModel;
+import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.keygenerator.mdkey.NumberCompressor;
 import org.apache.carbondata.core.metadata.DataType;
 import org.apache.carbondata.core.metadata.Encoding;
@@ -72,10 +72,10 @@ import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
 import org.apache.carbondata.core.reader.ThriftReader;
 import org.apache.carbondata.core.reader.ThriftReader.TBaseCreator;
 import org.apache.carbondata.core.service.PathService;
-import org.apache.carbondata.core.update.UpdateVO;
+import org.apache.carbondata.core.update.data.UpdateVO;
 import org.apache.carbondata.core.updatestatus.SegmentUpdateStatusManager;
 import org.apache.carbondata.format.DataChunk2;
-import org.apache.carbondata.scan.model.QueryDimension;
+import org.apache.carbondata.core.scan.model.QueryDimension;
 
 import org.apache.commons.lang.ArrayUtils;
 import org.apache.hadoop.conf.Configuration;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java b/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java
index 8c5c83f..4d9e5b8 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/DataFileFooterConverter.java
@@ -30,8 +30,8 @@ import org.apache.carbondata.core.metadata.blocklet.DataFileFooter;
 import org.apache.carbondata.core.metadata.blocklet.datachunk.DataChunk;
 import org.apache.carbondata.core.metadata.blocklet.index.BlockletIndex;
 import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
-import org.apache.carbondata.core.datastorage.store.FileHolder;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
+import org.apache.carbondata.core.datastorage.FileHolder;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.reader.CarbonFooterReader;
 import org.apache.carbondata.format.FileFooter;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/util/ValueCompressionUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/util/ValueCompressionUtil.java b/core/src/main/java/org/apache/carbondata/core/util/ValueCompressionUtil.java
index a9be95c..40f13f1 100644
--- a/core/src/main/java/org/apache/carbondata/core/util/ValueCompressionUtil.java
+++ b/core/src/main/java/org/apache/carbondata/core/util/ValueCompressionUtil.java
@@ -27,14 +27,31 @@ import org.apache.carbondata.core.compression.BigDecimalCompressor;
 import org.apache.carbondata.core.compression.BigIntCompressor;
 import org.apache.carbondata.core.compression.DoubleCompressor;
 import org.apache.carbondata.core.compression.ValueCompressor;
-import org.apache.carbondata.core.datastorage.store.compression.MeasureMetaDataModel;
-import org.apache.carbondata.core.datastorage.store.compression.ReaderCompressModel;
-import org.apache.carbondata.core.datastorage.store.compression.ValueCompressionHolder;
-import org.apache.carbondata.core.datastorage.store.compression.WriterCompressModel;
-import org.apache.carbondata.core.datastorage.store.compression.decimal.*;
-import org.apache.carbondata.core.datastorage.store.compression.nondecimal.*;
-import org.apache.carbondata.core.datastorage.store.compression.none.*;
-import org.apache.carbondata.core.datastorage.store.compression.type.*;
+import org.apache.carbondata.core.datastorage.compression.MeasureMetaDataModel;
+import org.apache.carbondata.core.datastorage.compression.ReaderCompressModel;
+import org.apache.carbondata.core.datastorage.compression.ValueCompressionHolder;
+import org.apache.carbondata.core.datastorage.compression.WriterCompressModel;
+import org.apache.carbondata.core.datastorage.compression.decimal.CompressionMaxMinByte;
+import org.apache.carbondata.core.datastorage.compression.decimal.CompressionMaxMinDefault;
+import org.apache.carbondata.core.datastorage.compression.decimal.CompressionMaxMinInt;
+import org.apache.carbondata.core.datastorage.compression.decimal.CompressionMaxMinLong;
+import org.apache.carbondata.core.datastorage.compression.decimal.CompressionMaxMinShort;
+import org.apache.carbondata.core.datastorage.compression.nondecimal.CompressionNonDecimalByte;
+import org.apache.carbondata.core.datastorage.compression.nondecimal.CompressionNonDecimalDefault;
+import org.apache.carbondata.core.datastorage.compression.nondecimal.CompressionNonDecimalInt;
+import org.apache.carbondata.core.datastorage.compression.nondecimal.CompressionNonDecimalLong;
+import org.apache.carbondata.core.datastorage.compression.nondecimal.CompressionNonDecimalMaxMinByte;
+import org.apache.carbondata.core.datastorage.compression.nondecimal.CompressionNonDecimalMaxMinDefault;
+import org.apache.carbondata.core.datastorage.compression.nondecimal.CompressionNonDecimalMaxMinInt;
+import org.apache.carbondata.core.datastorage.compression.nondecimal.CompressionNonDecimalMaxMinLong;
+import org.apache.carbondata.core.datastorage.compression.nondecimal.CompressionNonDecimalMaxMinShort;
+import org.apache.carbondata.core.datastorage.compression.nondecimal.CompressionNonDecimalShort;
+import org.apache.carbondata.core.datastorage.compression.none.CompressionNoneByte;
+import org.apache.carbondata.core.datastorage.compression.none.CompressionNoneDefault;
+import org.apache.carbondata.core.datastorage.compression.none.CompressionNoneInt;
+import org.apache.carbondata.core.datastorage.compression.none.CompressionNoneLong;
+import org.apache.carbondata.core.datastorage.compression.none.CompressionNoneShort;
+import org.apache.carbondata.core.datastorage.compression.type.CompressionBigDecimal;
 import org.apache.carbondata.core.metadata.ValueEncoderMeta;
 
 public final class ValueCompressionUtil {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriterImpl.java b/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriterImpl.java
index 1683f24..77fb571 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriterImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/CarbonDeleteDeltaWriterImpl.java
@@ -27,7 +27,7 @@ import java.io.OutputStreamWriter;
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.update.DeleteDeltaBlockDetails;
 import org.apache.carbondata.core.util.CarbonUtil;
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java b/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
index 78d5e28..9fe894a 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/CarbonDictionaryWriterImpl.java
@@ -25,15 +25,15 @@ import java.nio.charset.Charset;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.carbondata.common.factory.CarbonCommonFactory;
+import org.apache.carbondata.core.service.CarbonCommonFactory;
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.CarbonTableIdentifier;
 import org.apache.carbondata.core.ColumnIdentifier;
 import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.store.filesystem.CarbonFile;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
+import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.reader.CarbonDictionaryColumnMetaChunk;
 import org.apache.carbondata.core.reader.CarbonDictionaryMetadataReader;
 import org.apache.carbondata.core.reader.CarbonDictionaryMetadataReaderImpl;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/writer/ThriftWriter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/ThriftWriter.java b/core/src/main/java/org/apache/carbondata/core/writer/ThriftWriter.java
index 93b17f3..6a1025a 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/ThriftWriter.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/ThriftWriter.java
@@ -22,7 +22,7 @@ package org.apache.carbondata.core.writer;
 import java.io.DataOutputStream;
 import java.io.IOException;
 
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.util.CarbonUtil;
 
 import org.apache.hadoop.fs.FSDataOutputStream;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
index b6625f4..9f9d7ab 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortIndexWriterImpl.java
@@ -23,15 +23,15 @@ import java.util.Arrays;
 import java.util.Comparator;
 import java.util.List;
 
-import org.apache.carbondata.common.factory.CarbonCommonFactory;
+import org.apache.carbondata.core.service.CarbonCommonFactory;
 import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.CarbonTableIdentifier;
 import org.apache.carbondata.core.ColumnIdentifier;
 import org.apache.carbondata.core.path.CarbonTablePath;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.store.filesystem.CarbonFile;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
+import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.service.PathService;
 import org.apache.carbondata.core.util.CarbonProperties;
 import org.apache.carbondata.core.util.CarbonUtil;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/fileoperations/AtomicFileOperationsImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/fileoperations/AtomicFileOperationsImpl.java b/core/src/main/java/org/apache/carbondata/fileoperations/AtomicFileOperationsImpl.java
index 8e4c502..1bb8ba3 100644
--- a/core/src/main/java/org/apache/carbondata/fileoperations/AtomicFileOperationsImpl.java
+++ b/core/src/main/java/org/apache/carbondata/fileoperations/AtomicFileOperationsImpl.java
@@ -24,9 +24,9 @@ import java.io.DataOutputStream;
 import java.io.IOException;
 
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.store.filesystem.CarbonFile;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory.FileType;
+import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
+import org.apache.carbondata.core.datastorage.impl.FileFactory.FileType;
 
 public class AtomicFileOperationsImpl implements AtomicFileOperations {
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/locks/HdfsFileLock.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/locks/HdfsFileLock.java b/core/src/main/java/org/apache/carbondata/locks/HdfsFileLock.java
index ee67b4c..d61df15 100644
--- a/core/src/main/java/org/apache/carbondata/locks/HdfsFileLock.java
+++ b/core/src/main/java/org/apache/carbondata/locks/HdfsFileLock.java
@@ -25,8 +25,8 @@ import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.CarbonTableIdentifier;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.store.filesystem.CarbonFile;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
+import org.apache.carbondata.core.datastorage.filesystem.CarbonFile;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
 import org.apache.carbondata.core.util.CarbonProperties;
 
 import org.apache.hadoop.conf.Configuration;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/locks/LocalFileLock.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/locks/LocalFileLock.java b/core/src/main/java/org/apache/carbondata/locks/LocalFileLock.java
index c09a42c..e61dcd5 100644
--- a/core/src/main/java/org/apache/carbondata/locks/LocalFileLock.java
+++ b/core/src/main/java/org/apache/carbondata/locks/LocalFileLock.java
@@ -28,7 +28,7 @@ import org.apache.carbondata.common.logging.LogService;
 import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.CarbonTableIdentifier;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
+import org.apache.carbondata.core.datastorage.impl.FileFactory;
 
 /**
  * This class handles the file locking in the local file system.

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/scan/collector/ScannedResultCollector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/collector/ScannedResultCollector.java b/core/src/main/java/org/apache/carbondata/scan/collector/ScannedResultCollector.java
deleted file mode 100644
index e5324a8..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/collector/ScannedResultCollector.java
+++ /dev/null
@@ -1,45 +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.scan.collector;
-
-import java.util.List;
-
-import org.apache.carbondata.scan.result.AbstractScannedResult;
-import org.apache.carbondata.scan.result.vector.CarbonColumnarBatch;
-
-/**
- * Interface which will be used to aggregate the scan result
- */
-public interface ScannedResultCollector {
-
-  /**
-   * Below method will be used to aggregate the scanned result
-   *
-   * @param scannedResult scanned result
-   * @return how many records was aggregated
-   */
-  List<Object[]> collectData(AbstractScannedResult scannedResult, int batchSize);
-
-  /**
-   * Collects data in columnar format.
-   * @param scannedResult
-   * @param columnarBatch
-   */
-  void collectVectorBatch(AbstractScannedResult scannedResult, CarbonColumnarBatch columnarBatch);
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/scan/collector/impl/AbstractScannedResultCollector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/collector/impl/AbstractScannedResultCollector.java b/core/src/main/java/org/apache/carbondata/scan/collector/impl/AbstractScannedResultCollector.java
deleted file mode 100644
index ff4c1da..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/collector/impl/AbstractScannedResultCollector.java
+++ /dev/null
@@ -1,159 +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.scan.collector.impl;
-
-import java.util.List;
-
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
-import org.apache.carbondata.core.datastore.chunk.MeasureColumnDataChunk;
-import org.apache.carbondata.core.metadata.DataType;
-import org.apache.carbondata.core.keygenerator.KeyGenException;
-import org.apache.carbondata.scan.collector.ScannedResultCollector;
-import org.apache.carbondata.scan.executor.infos.BlockExecutionInfo;
-import org.apache.carbondata.scan.executor.infos.KeyStructureInfo;
-import org.apache.carbondata.scan.executor.util.QueryUtil;
-import org.apache.carbondata.scan.result.AbstractScannedResult;
-import org.apache.carbondata.scan.result.vector.CarbonColumnarBatch;
-import org.apache.carbondata.scan.wrappers.ByteArrayWrapper;
-
-/**
- * It is not a collector it is just a scanned result holder.
- */
-public abstract class AbstractScannedResultCollector implements ScannedResultCollector {
-
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(AbstractScannedResultCollector.class.getName());
-
-  /**
-   * restructuring info
-   */
-  private KeyStructureInfo restructureInfos;
-
-  /**
-   * table block execution infos
-   */
-  protected BlockExecutionInfo tableBlockExecutionInfos;
-
-  /**
-   * Measure ordinals
-   */
-  protected int[] measuresOrdinal;
-
-  /**
-   * to check whether measure exists in current table block or not this to
-   * handle restructuring scenario
-   */
-  protected boolean[] isMeasureExistsInCurrentBlock;
-
-  /**
-   * default value of the measures in case of restructuring some measure wont
-   * be present in the table so in that default value will be used to
-   * aggregate the data for that measure columns
-   */
-  private Object[] measureDefaultValue;
-
-  /**
-   * measure datatypes.
-   */
-  protected DataType[] measureDatatypes;
-
-  public AbstractScannedResultCollector(BlockExecutionInfo blockExecutionInfos) {
-    this.tableBlockExecutionInfos = blockExecutionInfos;
-    restructureInfos = blockExecutionInfos.getKeyStructureInfo();
-    measuresOrdinal = tableBlockExecutionInfos.getAggregatorInfo().getMeasureOrdinals();
-    isMeasureExistsInCurrentBlock = tableBlockExecutionInfos.getAggregatorInfo().getMeasureExists();
-    measureDefaultValue = tableBlockExecutionInfos.getAggregatorInfo().getDefaultValues();
-    this.measureDatatypes = tableBlockExecutionInfos.getAggregatorInfo().getMeasureDataTypes();
-  }
-
-  protected void fillMeasureData(Object[] msrValues, int offset,
-      AbstractScannedResult scannedResult) {
-    for (short i = 0; i < measuresOrdinal.length; i++) {
-      // if measure exists is block then pass measure column
-      // data chunk to the collector
-      if (isMeasureExistsInCurrentBlock[i]) {
-        msrValues[i + offset] = getMeasureData(scannedResult.getMeasureChunk(measuresOrdinal[i]),
-            scannedResult.getCurrenrRowId(), measureDatatypes[i]);
-      } else {
-        // if not then get the default value and use that value in aggregation
-        msrValues[i + offset] = measureDefaultValue[i];
-      }
-    }
-  }
-
-  private Object getMeasureData(MeasureColumnDataChunk dataChunk, int index, DataType dataType) {
-    if (!dataChunk.getNullValueIndexHolder().getBitSet().get(index)) {
-      switch (dataType) {
-        case SHORT:
-        case INT:
-        case LONG:
-          return dataChunk.getMeasureDataHolder().getReadableLongValueByIndex(index);
-        case DECIMAL:
-          return org.apache.spark.sql.types.Decimal
-              .apply(dataChunk.getMeasureDataHolder().getReadableBigDecimalValueByIndex(index));
-        default:
-          return dataChunk.getMeasureDataHolder().getReadableDoubleValueByIndex(index);
-      }
-    }
-    return null;
-  }
-
-  /**
-   * Below method will used to get the result
-   */
-  protected void updateData(List<Object[]> listBasedResult) {
-    if (tableBlockExecutionInfos.isFixedKeyUpdateRequired()) {
-      updateKeyWithLatestBlockKeygenerator(listBasedResult);
-    }
-  }
-
-  /**
-   * Below method will be used to update the fixed length key with the
-   * latest block key generator
-   *
-   * @return updated block
-   */
-  private void updateKeyWithLatestBlockKeygenerator(List<Object[]> listBasedResult) {
-    try {
-      long[] data = null;
-      ByteArrayWrapper key = null;
-      for (int i = 0; i < listBasedResult.size(); i++) {
-        // get the key
-        key = (ByteArrayWrapper) listBasedResult.get(i)[0];
-        // unpack the key with table block key generator
-        data = tableBlockExecutionInfos.getBlockKeyGenerator()
-            .getKeyArray(key.getDictionaryKey(), tableBlockExecutionInfos.getMaskedByteForBlock());
-        // packed the key with latest block key generator
-        // and generate the masked key for that key
-        key.setDictionaryKey(QueryUtil
-            .getMaskedKey(restructureInfos.getKeyGenerator().generateKey(data),
-                restructureInfos.getMaxKey(), restructureInfos.getMaskByteRanges(),
-                restructureInfos.getMaskByteRanges().length));
-      }
-    } catch (KeyGenException e) {
-      LOGGER.error(e);
-    }
-  }
-
-  @Override public void collectVectorBatch(AbstractScannedResult scannedResult,
-      CarbonColumnarBatch columnarBatch) {
-    throw new UnsupportedOperationException("Works only for batch collectors");
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/scan/collector/impl/DictionaryBasedResultCollector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/collector/impl/DictionaryBasedResultCollector.java b/core/src/main/java/org/apache/carbondata/scan/collector/impl/DictionaryBasedResultCollector.java
deleted file mode 100644
index 853bfec..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/collector/impl/DictionaryBasedResultCollector.java
+++ /dev/null
@@ -1,172 +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.scan.collector.impl;
-
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.carbondata.common.iudprocessor.cache.BlockletLevelDeleteDeltaDataCache;
-import org.apache.carbondata.core.metadata.DataType;
-import org.apache.carbondata.core.metadata.Encoding;
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryGenerator;
-import org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryKeyGeneratorFactory;
-import org.apache.carbondata.core.util.CarbonUtil;
-import org.apache.carbondata.core.util.DataTypeUtil;
-import org.apache.carbondata.scan.executor.infos.BlockExecutionInfo;
-import org.apache.carbondata.scan.filter.GenericQueryType;
-import org.apache.carbondata.scan.model.QueryDimension;
-import org.apache.carbondata.scan.model.QueryMeasure;
-import org.apache.carbondata.scan.result.AbstractScannedResult;
-
-import org.apache.commons.lang3.ArrayUtils;
-/**
- * It is not a collector it is just a scanned result holder.
- */
-public class DictionaryBasedResultCollector extends AbstractScannedResultCollector {
-
-  public DictionaryBasedResultCollector(BlockExecutionInfo blockExecutionInfos) {
-    super(blockExecutionInfos);
-  }
-
-  /**
-   * This method will add a record both key and value to list object
-   * it will keep track of how many record is processed, to handle limit scenario
-   */
-  @Override public List<Object[]> collectData(AbstractScannedResult scannedResult, int batchSize) {
-
-    List<Object[]> listBasedResult = new ArrayList<>(batchSize);
-    boolean isMsrsPresent = measureDatatypes.length > 0;
-
-    QueryDimension[] queryDimensions = tableBlockExecutionInfos.getQueryDimensions();
-    List<Integer> dictionaryIndexes = new ArrayList<Integer>();
-    for (int i = 0; i < queryDimensions.length; i++) {
-      if(queryDimensions[i].getDimension().hasEncoding(Encoding.DICTIONARY) ||
-          queryDimensions[i].getDimension().hasEncoding(Encoding.DIRECT_DICTIONARY) ) {
-        dictionaryIndexes.add(queryDimensions[i].getDimension().getOrdinal());
-      }
-    }
-    int[] primitive = ArrayUtils.toPrimitive(dictionaryIndexes.toArray(
-        new Integer[dictionaryIndexes.size()]));
-    Arrays.sort(primitive);
-    int[] actualIndexInSurrogateKey = new int[dictionaryIndexes.size()];
-    int index = 0;
-    for (int i = 0; i < queryDimensions.length; i++) {
-      if(queryDimensions[i].getDimension().hasEncoding(Encoding.DICTIONARY) ||
-          queryDimensions[i].getDimension().hasEncoding(Encoding.DIRECT_DICTIONARY) ) {
-        actualIndexInSurrogateKey[index++] = Arrays.binarySearch(primitive,
-            queryDimensions[i].getDimension().getOrdinal());
-      }
-    }
-
-    QueryMeasure[] queryMeasures = tableBlockExecutionInfos.getQueryMeasures();
-    BlockletLevelDeleteDeltaDataCache deleteDeltaDataCache =
-        scannedResult.getDeleteDeltaDataCache();
-    Map<Integer, GenericQueryType> comlexDimensionInfoMap =
-        tableBlockExecutionInfos.getComlexDimensionInfoMap();
-    boolean[] dictionaryEncodingArray = CarbonUtil.getDictionaryEncodingArray(queryDimensions);
-    boolean[] directDictionaryEncodingArray =
-        CarbonUtil.getDirectDictionaryEncodingArray(queryDimensions);
-    boolean[] implictColumnArray = CarbonUtil.getImplicitColumnArray(queryDimensions);
-    boolean[] complexDataTypeArray = CarbonUtil.getComplexDataTypeArray(queryDimensions);
-    int dimSize = queryDimensions.length;
-    boolean isDimensionsExist = dimSize > 0;
-    int[] order = new int[dimSize + queryMeasures.length];
-    for (int i = 0; i < dimSize; i++) {
-      order[i] = queryDimensions[i].getQueryOrder();
-    }
-    for (int i = 0; i < queryMeasures.length; i++) {
-      order[i + dimSize] = queryMeasures[i].getQueryOrder();
-    }
-    // scan the record and add to list
-    int rowCounter = 0;
-    int dictionaryColumnIndex = 0;
-    int noDictionaryColumnIndex = 0;
-    int complexTypeColumnIndex = 0;
-    int[] surrogateResult;
-    String[] noDictionaryKeys;
-    byte[][] complexTypeKeyArray;
-    while (scannedResult.hasNext() && rowCounter < batchSize) {
-      Object[] row = new Object[dimSize + queryMeasures.length];
-      if (isDimensionsExist) {
-        surrogateResult = scannedResult.getDictionaryKeyIntegerArray();
-        noDictionaryKeys = scannedResult.getNoDictionaryKeyStringArray();
-        complexTypeKeyArray = scannedResult.getComplexTypeKeyArray();
-        dictionaryColumnIndex = 0;
-        noDictionaryColumnIndex = 0;
-        complexTypeColumnIndex = 0;
-        for (int i = 0; i < dimSize; i++) {
-          if (!dictionaryEncodingArray[i]) {
-            if (implictColumnArray[i]) {
-              if (CarbonCommonConstants.CARBON_IMPLICIT_COLUMN_TUPLEID
-                  .equals(queryDimensions[i].getDimension().getColName())) {
-                row[order[i]] = DataTypeUtil.getDataBasedOnDataType(
-                    scannedResult.getBlockletId() + CarbonCommonConstants.FILE_SEPARATOR
-                        + scannedResult.getCurrenrRowId(), DataType.STRING);
-              } else {
-                row[order[i]] = DataTypeUtil
-                    .getDataBasedOnDataType(scannedResult.getBlockletId(), DataType.STRING);
-              }
-            } else {
-              row[order[i]] = DataTypeUtil
-                  .getDataBasedOnDataType(noDictionaryKeys[noDictionaryColumnIndex++],
-                      queryDimensions[i].getDimension().getDataType());
-            }
-          } else if (directDictionaryEncodingArray[i]) {
-            DirectDictionaryGenerator directDictionaryGenerator =
-                DirectDictionaryKeyGeneratorFactory
-                    .getDirectDictionaryGenerator(queryDimensions[i].getDimension().getDataType());
-            if (directDictionaryGenerator != null) {
-              row[order[i]] = directDictionaryGenerator.getValueFromSurrogate(
-                  surrogateResult[actualIndexInSurrogateKey[dictionaryColumnIndex++]]);
-            }
-          } else if (complexDataTypeArray[i]) {
-            row[order[i]] = comlexDimensionInfoMap
-                .get(queryDimensions[i].getDimension().getOrdinal())
-                .getDataBasedOnDataTypeFromSurrogates(
-                    ByteBuffer.wrap(complexTypeKeyArray[complexTypeColumnIndex++]));
-          } else {
-            row[order[i]] = surrogateResult[actualIndexInSurrogateKey[dictionaryColumnIndex++]];
-          }
-        }
-
-      } else {
-        scannedResult.incrementCounter();
-      }
-      if (null != deleteDeltaDataCache && deleteDeltaDataCache
-          .contains(scannedResult.getCurrenrRowId())) {
-        continue;
-      }
-      if (isMsrsPresent) {
-        Object[] msrValues = new Object[measureDatatypes.length];
-        fillMeasureData(msrValues, 0, scannedResult);
-        for (int i = 0; i < msrValues.length; i++) {
-          row[order[i + dimSize]] = msrValues[i];
-        }
-      }
-      listBasedResult.add(row);
-      rowCounter++;
-    }
-    return listBasedResult;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/scan/collector/impl/DictionaryBasedVectorResultCollector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/collector/impl/DictionaryBasedVectorResultCollector.java b/core/src/main/java/org/apache/carbondata/scan/collector/impl/DictionaryBasedVectorResultCollector.java
deleted file mode 100644
index 41247e2..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/collector/impl/DictionaryBasedVectorResultCollector.java
+++ /dev/null
@@ -1,136 +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.scan.collector.impl;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-import org.apache.carbondata.core.metadata.Encoding;
-import org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryKeyGeneratorFactory;
-import org.apache.carbondata.scan.executor.infos.BlockExecutionInfo;
-import org.apache.carbondata.scan.model.QueryDimension;
-import org.apache.carbondata.scan.model.QueryMeasure;
-import org.apache.carbondata.scan.result.AbstractScannedResult;
-import org.apache.carbondata.scan.result.vector.CarbonColumnarBatch;
-import org.apache.carbondata.scan.result.vector.ColumnVectorInfo;
-import org.apache.carbondata.scan.result.vector.MeasureDataVectorProcessor;
-
-/**
- * It is not a collector it is just a scanned result holder.
- */
-public class DictionaryBasedVectorResultCollector extends AbstractScannedResultCollector {
-
-  private ColumnVectorInfo[] dictionaryInfo;
-
-  private ColumnVectorInfo[] noDictionaryInfo;
-
-  private ColumnVectorInfo[] complexInfo;
-
-  private ColumnVectorInfo[] measureInfo;
-
-  private ColumnVectorInfo[] allColumnInfo;
-
-  public DictionaryBasedVectorResultCollector(BlockExecutionInfo blockExecutionInfos) {
-    super(blockExecutionInfos);
-    QueryDimension[] queryDimensions = tableBlockExecutionInfos.getQueryDimensions();
-    QueryMeasure[] queryMeasures = tableBlockExecutionInfos.getQueryMeasures();
-    measureInfo = new ColumnVectorInfo[queryMeasures.length];
-    allColumnInfo = new ColumnVectorInfo[queryDimensions.length + queryMeasures.length];
-    List<ColumnVectorInfo> dictInfoList = new ArrayList<>();
-    List<ColumnVectorInfo> noDictInfoList = new ArrayList<>();
-    List<ColumnVectorInfo> complexList = new ArrayList<>();
-    for (int i = 0; i < queryDimensions.length; i++) {
-      if (!queryDimensions[i].getDimension().hasEncoding(Encoding.DICTIONARY)) {
-        ColumnVectorInfo columnVectorInfo = new ColumnVectorInfo();
-        noDictInfoList.add(columnVectorInfo);
-        columnVectorInfo.dimension = queryDimensions[i];
-        columnVectorInfo.ordinal = queryDimensions[i].getDimension().getOrdinal();
-        allColumnInfo[queryDimensions[i].getQueryOrder()] = columnVectorInfo;
-      } else if (queryDimensions[i].getDimension().hasEncoding(Encoding.DIRECT_DICTIONARY)) {
-        ColumnVectorInfo columnVectorInfo = new ColumnVectorInfo();
-        dictInfoList.add(columnVectorInfo);
-        columnVectorInfo.dimension = queryDimensions[i];
-        columnVectorInfo.directDictionaryGenerator = DirectDictionaryKeyGeneratorFactory
-            .getDirectDictionaryGenerator(queryDimensions[i].getDimension().getDataType());
-        columnVectorInfo.ordinal = queryDimensions[i].getDimension().getOrdinal();
-        allColumnInfo[queryDimensions[i].getQueryOrder()] = columnVectorInfo;
-      } else if (queryDimensions[i].getDimension().isComplex()) {
-        ColumnVectorInfo columnVectorInfo = new ColumnVectorInfo();
-        complexList.add(columnVectorInfo);
-        columnVectorInfo.dimension = queryDimensions[i];
-        columnVectorInfo.ordinal = queryDimensions[i].getDimension().getOrdinal();
-        columnVectorInfo.genericQueryType =
-            tableBlockExecutionInfos.getComlexDimensionInfoMap().get(columnVectorInfo.ordinal);
-        allColumnInfo[queryDimensions[i].getQueryOrder()] = columnVectorInfo;
-      } else {
-        ColumnVectorInfo columnVectorInfo = new ColumnVectorInfo();
-        dictInfoList.add(columnVectorInfo);
-        columnVectorInfo.dimension = queryDimensions[i];
-        columnVectorInfo.ordinal = queryDimensions[i].getDimension().getOrdinal();
-        allColumnInfo[queryDimensions[i].getQueryOrder()] = columnVectorInfo;
-      }
-    }
-    for (int i = 0; i < queryMeasures.length; i++) {
-      ColumnVectorInfo columnVectorInfo = new ColumnVectorInfo();
-      columnVectorInfo.measureVectorFiller = MeasureDataVectorProcessor.MeasureVectorFillerFactory
-          .getMeasureVectorFiller(queryMeasures[i].getMeasure().getDataType());
-      columnVectorInfo.ordinal = queryMeasures[i].getMeasure().getOrdinal();
-      columnVectorInfo.measure = queryMeasures[i];
-      measureInfo[i] = columnVectorInfo;
-      allColumnInfo[queryMeasures[i].getQueryOrder()] = columnVectorInfo;
-    }
-    dictionaryInfo = dictInfoList.toArray(new ColumnVectorInfo[dictInfoList.size()]);
-    noDictionaryInfo = noDictInfoList.toArray(new ColumnVectorInfo[noDictInfoList.size()]);
-    complexInfo = complexList.toArray(new ColumnVectorInfo[complexList.size()]);
-    Arrays.sort(dictionaryInfo);
-    Arrays.sort(noDictionaryInfo);
-    Arrays.sort(complexInfo);
-  }
-
-  @Override public List<Object[]> collectData(AbstractScannedResult scannedResult, int batchSize) {
-    throw new UnsupportedOperationException("collectData is not supported here");
-  }
-
-  @Override public void collectVectorBatch(AbstractScannedResult scannedResult,
-      CarbonColumnarBatch columnarBatch) {
-    int rowCounter = scannedResult.getRowCounter();
-    int availableRows = scannedResult.numberOfOutputRows() - rowCounter;
-    int requiredRows = columnarBatch.getBatchSize() - columnarBatch.getActualSize();
-    requiredRows = Math.min(requiredRows, availableRows);
-    if (requiredRows < 1) {
-      return;
-    }
-    for (int i = 0; i < allColumnInfo.length; i++) {
-      allColumnInfo[i].size = requiredRows;
-      allColumnInfo[i].offset = rowCounter;
-      allColumnInfo[i].vectorOffset = columnarBatch.getRowCounter();
-      allColumnInfo[i].vector = columnarBatch.columnVectors[i];
-    }
-
-    scannedResult.fillColumnarDictionaryBatch(dictionaryInfo);
-    scannedResult.fillColumnarNoDictionaryBatch(noDictionaryInfo);
-    scannedResult.fillColumnarMeasureBatch(measureInfo, measuresOrdinal);
-    scannedResult.fillColumnarComplexBatch(complexInfo);
-    scannedResult.setRowCounter(rowCounter + requiredRows);
-    columnarBatch.setActualSize(columnarBatch.getActualSize() + requiredRows);
-    columnarBatch.setRowCounter(columnarBatch.getRowCounter() + requiredRows);
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/scan/collector/impl/RawBasedResultCollector.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/collector/impl/RawBasedResultCollector.java b/core/src/main/java/org/apache/carbondata/scan/collector/impl/RawBasedResultCollector.java
deleted file mode 100644
index b61ef97..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/collector/impl/RawBasedResultCollector.java
+++ /dev/null
@@ -1,74 +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.scan.collector.impl;
-
-import java.nio.charset.Charset;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.carbondata.common.iudprocessor.cache.BlockletLevelDeleteDeltaDataCache;
-import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.scan.executor.infos.BlockExecutionInfo;
-import org.apache.carbondata.scan.model.QueryMeasure;
-import org.apache.carbondata.scan.result.AbstractScannedResult;
-import org.apache.carbondata.scan.wrappers.ByteArrayWrapper;
-
-
-/**
- * It is not a collector it is just a scanned result holder.
- */
-public class RawBasedResultCollector extends AbstractScannedResultCollector {
-
-  public RawBasedResultCollector(BlockExecutionInfo blockExecutionInfos) {
-    super(blockExecutionInfos);
-  }
-
-  /**
-   * This method will add a record both key and value to list object
-   * it will keep track of how many record is processed, to handle limit scenario
-   */
-  @Override public List<Object[]> collectData(AbstractScannedResult scannedResult, int batchSize) {
-    List<Object[]> listBasedResult = new ArrayList<>(batchSize);
-    QueryMeasure[] queryMeasures = tableBlockExecutionInfos.getQueryMeasures();
-    ByteArrayWrapper wrapper = null;
-    BlockletLevelDeleteDeltaDataCache deleteDeltaDataCache =
-        scannedResult.getDeleteDeltaDataCache();
-    // scan the record and add to list
-    int rowCounter = 0;
-    while (scannedResult.hasNext() && rowCounter < batchSize) {
-      Object[] row = new Object[1 + queryMeasures.length];
-      wrapper = new ByteArrayWrapper();
-      wrapper.setDictionaryKey(scannedResult.getDictionaryKeyArray());
-      wrapper.setNoDictionaryKeys(scannedResult.getNoDictionaryKeyArray());
-      wrapper.setComplexTypesKeys(scannedResult.getComplexTypeKeyArray());
-      wrapper.setImplicitColumnByteArray(scannedResult.getBlockletId()
-          .getBytes(Charset.forName(CarbonCommonConstants.DEFAULT_CHARSET)));
-      if (null != deleteDeltaDataCache && deleteDeltaDataCache
-          .contains(scannedResult.getCurrenrRowId())) {
-        continue;
-      }
-      row[0] = wrapper;
-      fillMeasureData(row, 1, scannedResult);
-      listBasedResult.add(row);
-      rowCounter++;
-    }
-    updateData(listBasedResult);
-    return listBasedResult;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/scan/complextypes/ArrayQueryType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/complextypes/ArrayQueryType.java b/core/src/main/java/org/apache/carbondata/scan/complextypes/ArrayQueryType.java
deleted file mode 100644
index b867669..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/complextypes/ArrayQueryType.java
+++ /dev/null
@@ -1,103 +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.scan.complextypes;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-
-import org.apache.carbondata.core.datastore.chunk.DimensionColumnDataChunk;
-import org.apache.carbondata.scan.filter.GenericQueryType;
-import org.apache.carbondata.scan.processor.BlocksChunkHolder;
-
-public class ArrayQueryType extends ComplexQueryType implements GenericQueryType {
-
-  private GenericQueryType children;
-
-  public ArrayQueryType(String name, String parentname, int blockIndex) {
-    super(name, parentname, blockIndex);
-  }
-
-  @Override public void addChildren(GenericQueryType children) {
-    if (this.getName().equals(children.getParentname())) {
-      this.children = children;
-    } else {
-      this.children.addChildren(children);
-    }
-  }
-
-  @Override public String getName() {
-    return name;
-  }
-
-  @Override public void setName(String name) {
-    this.name = name;
-  }
-
-  @Override public String getParentname() {
-    return parentname;
-  }
-
-  @Override public void setParentname(String parentname) {
-    this.parentname = parentname;
-
-  }
-
-  public void parseBlocksAndReturnComplexColumnByteArray(
-      DimensionColumnDataChunk[] dimensionColumnDataChunks, int rowNumber,
-      DataOutputStream dataOutputStream) throws IOException {
-    byte[] input = new byte[8];
-    copyBlockDataChunk(dimensionColumnDataChunks, rowNumber, input);
-    ByteBuffer byteArray = ByteBuffer.wrap(input);
-    int dataLength = byteArray.getInt();
-    dataOutputStream.writeInt(dataLength);
-    if (dataLength > 0) {
-      int columnIndex = byteArray.getInt();
-      for (int i = 0; i < dataLength; i++) {
-        children
-            .parseBlocksAndReturnComplexColumnByteArray(dimensionColumnDataChunks, columnIndex++,
-                dataOutputStream);
-      }
-    }
-  }
-
-  @Override public int getColsCount() {
-    return children.getColsCount() + 1;
-  }
-
-  @Override public void fillRequiredBlockData(BlocksChunkHolder blockChunkHolder)
-      throws IOException {
-    readBlockDataChunk(blockChunkHolder);
-    children.fillRequiredBlockData(blockChunkHolder);
-  }
-
-  @Override public Object getDataBasedOnDataTypeFromSurrogates(ByteBuffer surrogateData) {
-    int dataLength = surrogateData.getInt();
-    if (dataLength == -1) {
-      return null;
-    }
-    Object[] data = new Object[dataLength];
-    for (int i = 0; i < dataLength; i++) {
-      data[i] = children.getDataBasedOnDataTypeFromSurrogates(surrogateData);
-    }
-    return data;
-  }
-
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/scan/complextypes/ComplexQueryType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/complextypes/ComplexQueryType.java b/core/src/main/java/org/apache/carbondata/scan/complextypes/ComplexQueryType.java
deleted file mode 100644
index 2a21a6d..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/complextypes/ComplexQueryType.java
+++ /dev/null
@@ -1,64 +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.scan.complextypes;
-
-import java.io.IOException;
-
-import org.apache.carbondata.core.datastore.chunk.DimensionColumnDataChunk;
-import org.apache.carbondata.scan.filter.GenericQueryType;
-import org.apache.carbondata.scan.processor.BlocksChunkHolder;
-
-public class ComplexQueryType {
-  protected GenericQueryType children;
-
-  protected String name;
-
-  protected String parentname;
-
-  protected int blockIndex;
-
-  public ComplexQueryType(String name, String parentname, int blockIndex) {
-    this.name = name;
-    this.parentname = parentname;
-    this.blockIndex = blockIndex;
-  }
-
-  /**
-   * Method will copy the block chunk holder data to the passed
-   * byte[], this method is also used by child
-   *
-   * @param rowNumber
-   * @param input
-   */
-  protected void copyBlockDataChunk(DimensionColumnDataChunk[] dimensionColumnDataChunks,
-      int rowNumber, byte[] input) {
-    byte[] data = dimensionColumnDataChunks[blockIndex].getChunkData(rowNumber);
-    System.arraycopy(data, 0, input, 0, data.length);
-  }
-
-  /*
-   * This method will read the block data chunk from the respective block
-   */
-  protected void readBlockDataChunk(BlocksChunkHolder blockChunkHolder) throws IOException {
-    if (null == blockChunkHolder.getDimensionDataChunk()[blockIndex]) {
-      blockChunkHolder.getDimensionDataChunk()[blockIndex] = blockChunkHolder.getDataBlock()
-          .getDimensionChunk(blockChunkHolder.getFileReader(), blockIndex);
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/scan/complextypes/PrimitiveQueryType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/complextypes/PrimitiveQueryType.java b/core/src/main/java/org/apache/carbondata/scan/complextypes/PrimitiveQueryType.java
deleted file mode 100644
index 72805f6..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/complextypes/PrimitiveQueryType.java
+++ /dev/null
@@ -1,118 +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.scan.complextypes;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-
-import org.apache.carbondata.core.cache.dictionary.Dictionary;
-import org.apache.carbondata.core.datastore.chunk.DimensionColumnDataChunk;
-import org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryGenerator;
-import org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryKeyGeneratorFactory;
-import org.apache.carbondata.core.keygenerator.mdkey.Bits;
-import org.apache.carbondata.core.metadata.DataType;
-import org.apache.carbondata.core.util.DataTypeUtil;
-import org.apache.carbondata.scan.filter.GenericQueryType;
-import org.apache.carbondata.scan.processor.BlocksChunkHolder;
-
-public class PrimitiveQueryType extends ComplexQueryType implements GenericQueryType {
-
-  private String name;
-  private String parentname;
-
-  private int keySize;
-
-  private int blockIndex;
-
-  private Dictionary dictionary;
-
-  private DataType dataType;
-
-  private boolean isDirectDictionary;
-
-  public PrimitiveQueryType(String name, String parentname, int blockIndex, DataType dataType,
-      int keySize, Dictionary dictionary, boolean isDirectDictionary) {
-    super(name, parentname, blockIndex);
-    this.dataType = dataType;
-    this.keySize = keySize;
-    this.dictionary = dictionary;
-    this.name = name;
-    this.parentname = parentname;
-    this.blockIndex = blockIndex;
-    this.isDirectDictionary = isDirectDictionary;
-  }
-
-  @Override public void addChildren(GenericQueryType children) {
-
-  }
-
-  @Override public String getName() {
-    return name;
-  }
-
-  @Override public void setName(String name) {
-    this.name = name;
-  }
-
-  @Override public String getParentname() {
-    return parentname;
-  }
-
-  @Override public void setParentname(String parentname) {
-    this.parentname = parentname;
-
-  }
-
-  @Override public int getColsCount() {
-    return 1;
-  }
-
-  @Override public void parseBlocksAndReturnComplexColumnByteArray(
-      DimensionColumnDataChunk[] dimensionDataChunks, int rowNumber,
-      DataOutputStream dataOutputStream) throws IOException {
-    byte[] currentVal =
-        new byte[dimensionDataChunks[blockIndex].getColumnValueSize()];
-    copyBlockDataChunk(dimensionDataChunks, rowNumber, currentVal);
-    dataOutputStream.write(currentVal);
-  }
-
-  @Override public void fillRequiredBlockData(BlocksChunkHolder blockChunkHolder)
-      throws IOException {
-    readBlockDataChunk(blockChunkHolder);
-  }
-
-  @Override public Object getDataBasedOnDataTypeFromSurrogates(ByteBuffer surrogateData) {
-    byte[] data = new byte[keySize];
-    surrogateData.get(data);
-    Bits bit = new Bits(new int[]{keySize * 8});
-    int surrgateValue = (int)bit.getKeyArray(data, 0)[0];
-    Object actualData = null;
-    if (isDirectDictionary) {
-      DirectDictionaryGenerator directDictionaryGenerator = DirectDictionaryKeyGeneratorFactory
-          .getDirectDictionaryGenerator(dataType);
-      actualData = directDictionaryGenerator.getValueFromSurrogate(surrgateValue);
-    } else {
-      String dictionaryValueForKey = dictionary.getDictionaryValueForKey(surrgateValue);
-      actualData = DataTypeUtil.getDataBasedOnDataType(dictionaryValueForKey, this.dataType);
-    }
-    return actualData;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/scan/complextypes/StructQueryType.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/complextypes/StructQueryType.java b/core/src/main/java/org/apache/carbondata/scan/complextypes/StructQueryType.java
deleted file mode 100644
index 4064efe..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/complextypes/StructQueryType.java
+++ /dev/null
@@ -1,114 +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.scan.complextypes;
-
-import java.io.DataOutputStream;
-import java.io.IOException;
-import java.nio.ByteBuffer;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.apache.carbondata.core.datastore.chunk.DimensionColumnDataChunk;
-import org.apache.carbondata.scan.filter.GenericQueryType;
-import org.apache.carbondata.scan.processor.BlocksChunkHolder;
-
-public class StructQueryType extends ComplexQueryType implements GenericQueryType {
-
-  private List<GenericQueryType> children = new ArrayList<GenericQueryType>();
-  private String name;
-  private String parentname;
-
-  public StructQueryType(String name, String parentname, int blockIndex) {
-    super(name, parentname, blockIndex);
-    this.name = name;
-    this.parentname = parentname;
-  }
-
-  @Override public void addChildren(GenericQueryType newChild) {
-    if (this.getName().equals(newChild.getParentname())) {
-      this.children.add(newChild);
-    } else {
-      for (GenericQueryType child : this.children) {
-        child.addChildren(newChild);
-      }
-    }
-
-  }
-
-  @Override public String getName() {
-    return name;
-  }
-
-  @Override public void setName(String name) {
-    this.name = name;
-  }
-
-  @Override public String getParentname() {
-    return parentname;
-  }
-
-  @Override public void setParentname(String parentname) {
-    this.parentname = parentname;
-
-  }
-
-  @Override public int getColsCount() {
-    int colsCount = 1;
-    for (int i = 0; i < children.size(); i++) {
-      colsCount += children.get(i).getColsCount();
-    }
-    return colsCount;
-  }
-
-  @Override public void parseBlocksAndReturnComplexColumnByteArray(
-      DimensionColumnDataChunk[] dimensionColumnDataChunks, int rowNumber,
-      DataOutputStream dataOutputStream) throws IOException {
-    byte[] input = new byte[8];
-    copyBlockDataChunk(dimensionColumnDataChunks, rowNumber, input);
-    ByteBuffer byteArray = ByteBuffer.wrap(input);
-    int childElement = byteArray.getInt();
-    dataOutputStream.writeInt(childElement);
-    if (childElement > 0){
-      for (int i = 0; i < childElement; i++) {
-        children.get(i)
-            .parseBlocksAndReturnComplexColumnByteArray(dimensionColumnDataChunks, rowNumber,
-                dataOutputStream);
-      }
-    }
-  }
-
-  @Override public void fillRequiredBlockData(BlocksChunkHolder blockChunkHolder)
-      throws IOException {
-    readBlockDataChunk(blockChunkHolder);
-
-    for (int i = 0; i < children.size(); i++) {
-      children.get(i).fillRequiredBlockData(blockChunkHolder);
-    }
-  }
-
-  @Override public Object getDataBasedOnDataTypeFromSurrogates(ByteBuffer surrogateData) {
-    int childLength = surrogateData.getInt();
-    Object[] fields = new Object[childLength];
-    for (int i = 0; i < childLength; i++) {
-      fields[i] =  children.get(i).getDataBasedOnDataTypeFromSurrogates(surrogateData);
-    }
-    return fields;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/scan/executor/QueryExecutor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/QueryExecutor.java b/core/src/main/java/org/apache/carbondata/scan/executor/QueryExecutor.java
deleted file mode 100644
index 949771c..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/executor/QueryExecutor.java
+++ /dev/null
@@ -1,51 +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.scan.executor;
-
-import java.io.IOException;
-
-import org.apache.carbondata.common.CarbonIterator;
-import org.apache.carbondata.scan.executor.exception.QueryExecutionException;
-import org.apache.carbondata.scan.model.QueryModel;
-
-/**
- * Interface for carbon query executor.
- * Will be used to execute the query based on the query model
- * and will return the iterator over query result
- */
-public interface QueryExecutor<E> {
-
-  /**
-   * Below method will be used to execute the query based on query model passed from driver
-   *
-   * @param queryModel query details
-   * @return query result iterator
-   * @throws QueryExecutionException if any failure while executing the query
-   * @throws IOException if fail to read files
-   */
-  CarbonIterator<E> execute(QueryModel queryModel)
-      throws QueryExecutionException, IOException;
-
-  /**
-   * Below method will be used for cleanup
-   *
-   * @throws QueryExecutionException
-   */
-  void finish() throws QueryExecutionException;
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/scan/executor/QueryExecutorFactory.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/QueryExecutorFactory.java b/core/src/main/java/org/apache/carbondata/scan/executor/QueryExecutorFactory.java
deleted file mode 100644
index 947b992..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/executor/QueryExecutorFactory.java
+++ /dev/null
@@ -1,38 +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.scan.executor;
-
-import org.apache.carbondata.scan.executor.impl.DetailQueryExecutor;
-import org.apache.carbondata.scan.executor.impl.VectorDetailQueryExecutor;
-import org.apache.carbondata.scan.model.QueryModel;
-
-/**
- * Factory class to get the query executor from RDD
- * This will return the executor based on query type
- */
-public class QueryExecutorFactory {
-
-  public static QueryExecutor getQueryExecutor(QueryModel queryModel) {
-    if (queryModel.isVectorReader()) {
-      return new VectorDetailQueryExecutor();
-    } else {
-      return new DetailQueryExecutor();
-    }
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/952cf517/core/src/main/java/org/apache/carbondata/scan/executor/exception/QueryExecutionException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/exception/QueryExecutionException.java b/core/src/main/java/org/apache/carbondata/scan/executor/exception/QueryExecutionException.java
deleted file mode 100644
index 5634e0f..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/executor/exception/QueryExecutionException.java
+++ /dev/null
@@ -1,94 +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.scan.executor.exception;
-
-import java.util.Locale;
-
-/**
- * Exception class for query execution
- *
- * @author Administrator
- */
-public class QueryExecutionException extends Exception {
-
-  /**
-   * default serial version ID.
-   */
-  private static final long serialVersionUID = 1L;
-
-  /**
-   * The Error message.
-   */
-  private String msg = "";
-
-  /**
-   * Constructor
-   *
-   * @param msg       The error message for this exception.
-   */
-  public QueryExecutionException(String msg) {
-    super(msg);
-    this.msg = msg;
-  }
-
-  /**
-   * Constructor
-   *
-   * @param msg       The error message for this exception.
-   */
-  public QueryExecutionException(String msg, Throwable t) {
-    super(msg, t);
-    this.msg = msg;
-  }
-
-  /**
-   * Constructor
-   *
-   * @param t
-   */
-  public QueryExecutionException(Throwable t) {
-    super(t);
-  }
-
-  /**
-   * This method is used to get the localized message.
-   *
-   * @param locale - A Locale object represents a specific geographical,
-   *               political, or cultural region.
-   * @return - Localized error message.
-   */
-  public String getLocalizedMessage(Locale locale) {
-    return "";
-  }
-
-  /**
-   * getLocalizedMessage
-   */
-  @Override public String getLocalizedMessage() {
-    return super.getLocalizedMessage();
-  }
-
-  /**
-   * getMessage
-   */
-  public String getMessage() {
-    return this.msg;
-  }
-
-}


Mime
View raw message