carbondata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ravipes...@apache.org
Subject [5/9] incubator-carbondata git commit: clean up core
Date Wed, 04 Jan 2017 13:34:59 GMT
http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/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 7072edd..cb66214 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
@@ -97,7 +97,7 @@ public class CarbonDictionarySortIndexWriterImpl implements CarbonDictionarySort
    * @param sortIndexList list of sortIndex
    * @throws IOException In Case of any I/O errors occurs.
    */
-  @Override public void writeSortIndex(List<Integer> sortIndexList) throws IOException {
+  @Override public void writeSortIndex(List<Integer> sortIndexList) {
     columnSortInfo.setSort_index(sortIndexList);
   }
 
@@ -108,8 +108,7 @@ public class CarbonDictionarySortIndexWriterImpl implements CarbonDictionarySort
    * @param invertedSortIndexList list of  sortIndexInverted
    * @throws IOException In Case of any I/O errors occurs.
    */
-  @Override public void writeInvertedSortIndex(List<Integer> invertedSortIndexList)
-      throws IOException {
+  @Override public void writeInvertedSortIndex(List<Integer> invertedSortIndexList) {
     columnSortInfo.setSort_index_inverted(invertedSortIndexList);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparator.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparator.java b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparator.java
index 3a7f0f1..666afe9 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparator.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortInfoPreparator.java
@@ -27,7 +27,6 @@ import org.apache.carbondata.core.cache.dictionary.Dictionary;
 import org.apache.carbondata.core.cache.dictionary.DictionaryChunksWrapper;
 import org.apache.carbondata.core.carbon.metadata.datatype.DataType;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.util.CarbonUtilException;
 
 import org.apache.commons.lang.ArrayUtils;
 
@@ -44,10 +43,9 @@ public class CarbonDictionarySortInfoPreparator {
    * @param dictionary        old distinct values
    * @param dataType          DataType of columns
    * @return CarbonDictionarySortInfo returns the column Sort Info
-   * @throws CarbonUtilException
    */
   public CarbonDictionarySortInfo getDictionarySortInfo(List<String> newDistinctValues,
-      Dictionary dictionary, DataType dataType) throws CarbonUtilException {
+      Dictionary dictionary, DataType dataType) {
     CarbonDictionarySortModel[] dictionarySortModels =
         prepareDictionarySortModels(newDistinctValues, dictionary, dataType);
     return createColumnSortInfo(dictionarySortModels);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java
index c90d41c..ddf460c 100644
--- a/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java
+++ b/core/src/main/java/org/apache/carbondata/core/writer/sortindex/CarbonDictionarySortModel.java
@@ -133,8 +133,7 @@ public class CarbonDictionarySortModel implements Comparable<CarbonDictionarySor
    * @see Object#hashCode()
    */
   @Override public int hashCode() {
-    int result = ((memberValue == null) ? 0 : memberValue.hashCode());
-    return result;
+    return ((memberValue == null) ? 0 : memberValue.hashCode());
   }
 
   /**
@@ -168,13 +167,4 @@ public class CarbonDictionarySortModel implements Comparable<CarbonDictionarySor
     return key;
   }
 
-  /**
-   * Returns member buye
-   *
-   * @return
-   */
-  public String getMemberValue() {
-    return memberValue;
-  }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/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
index 2462caa..52815b7 100644
--- 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
@@ -24,8 +24,6 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.carbon.metadata.encoder.Encoding;
 import org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryGenerator;
 import org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryKeyGeneratorFactory;
@@ -43,9 +41,6 @@ import org.apache.commons.lang3.ArrayUtils;
  */
 public class DictionaryBasedResultCollector extends AbstractScannedResultCollector {
 
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(DictionaryBasedResultCollector.class.getName());
-
   public DictionaryBasedResultCollector(BlockExecutionInfo blockExecutionInfos) {
     super(blockExecutionInfos);
   }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/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
index 500aa2c..cab7caf 100644
--- 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
@@ -22,8 +22,6 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
 
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.core.carbon.metadata.encoder.Encoding;
 import org.apache.carbondata.core.keygenerator.directdictionary.DirectDictionaryKeyGeneratorFactory;
 import org.apache.carbondata.scan.executor.infos.BlockExecutionInfo;
@@ -39,9 +37,6 @@ import org.apache.carbondata.scan.result.vector.MeasureDataVectorProcessor;
  */
 public class DictionaryBasedVectorResultCollector extends AbstractScannedResultCollector {
 
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(DictionaryBasedVectorResultCollector.class.getName());
-
   private ColumnVectorInfo[] dictionaryInfo;
 
   private ColumnVectorInfo[] noDictionaryInfo;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/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
index 74d4170..aa885d3 100644
--- 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
@@ -21,8 +21,6 @@ package org.apache.carbondata.scan.collector.impl;
 import java.util.ArrayList;
 import java.util.List;
 
-import org.apache.carbondata.common.logging.LogService;
-import org.apache.carbondata.common.logging.LogServiceFactory;
 import org.apache.carbondata.scan.executor.infos.BlockExecutionInfo;
 import org.apache.carbondata.scan.model.QueryMeasure;
 import org.apache.carbondata.scan.result.AbstractScannedResult;
@@ -33,9 +31,6 @@ import org.apache.carbondata.scan.wrappers.ByteArrayWrapper;
  */
 public class RawBasedResultCollector extends AbstractScannedResultCollector {
 
-  private static final LogService LOGGER =
-      LogServiceFactory.getLogService(RawBasedResultCollector.class.getName());
-
   public RawBasedResultCollector(BlockExecutionInfo blockExecutionInfos) {
     super(blockExecutionInfos);
   }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/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
index 8dd6749..4d6d30c 100644
--- a/core/src/main/java/org/apache/carbondata/scan/complextypes/ArrayQueryType.java
+++ b/core/src/main/java/org/apache/carbondata/scan/complextypes/ArrayQueryType.java
@@ -22,7 +22,6 @@ package org.apache.carbondata.scan.complextypes;
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
-import java.util.List;
 
 import org.apache.carbondata.core.carbon.datastore.chunk.DimensionColumnDataChunk;
 import org.apache.carbondata.scan.filter.GenericQueryType;
@@ -34,7 +33,6 @@ import org.apache.spark.sql.types.*;
 public class ArrayQueryType extends ComplexQueryType implements GenericQueryType {
 
   private GenericQueryType children;
-  private int keyOrdinalForQuery;
 
   public ArrayQueryType(String name, String parentname, int blockIndex) {
     super(name, parentname, blockIndex);
@@ -65,14 +63,6 @@ public class ArrayQueryType extends ComplexQueryType implements GenericQueryType
 
   }
 
-  @Override public void getAllPrimitiveChildren(List<GenericQueryType> primitiveChild) {
-    if (children instanceof PrimitiveQueryType) {
-      primitiveChild.add(children);
-    } else {
-      children.getAllPrimitiveChildren(primitiveChild);
-    }
-  }
-
   public void parseBlocksAndReturnComplexColumnByteArray(
       DimensionColumnDataChunk[] dimensionColumnDataChunks, int rowNumber,
       DataOutputStream dataOutputStream) throws IOException {
@@ -81,9 +71,7 @@ public class ArrayQueryType extends ComplexQueryType implements GenericQueryType
     ByteBuffer byteArray = ByteBuffer.wrap(input);
     int dataLength = byteArray.getInt();
     dataOutputStream.writeInt(dataLength);
-    if (dataLength == 0) {
-      // b.putInt(0);
-    } else {
+    if (dataLength > 0) {
       int columnIndex = byteArray.getInt();
       for (int i = 0; i < dataLength; i++) {
         children
@@ -93,52 +81,16 @@ public class ArrayQueryType extends ComplexQueryType implements GenericQueryType
     }
   }
 
-  @Override public int getSurrogateIndex() {
-    return 0;
-  }
-
-  @Override public void setSurrogateIndex(int surrIndex) {
-
-  }
-
-  @Override public int getBlockIndex() {
-    return blockIndex;
-  }
-
-  @Override public void setBlockIndex(int blockIndex) {
-    this.blockIndex = blockIndex;
-  }
-
   @Override public int getColsCount() {
     return children.getColsCount() + 1;
   }
 
-  @Override public void parseAndGetResultBytes(ByteBuffer complexData, DataOutputStream dataOutput)
-      throws IOException {
-    int dataLength = complexData.getInt();
-    dataOutput.writeInt(dataLength);
-    for (int i = 0; i < dataLength; i++) {
-      children.parseAndGetResultBytes(complexData, dataOutput);
-    }
-  }
-
-  @Override public void setKeySize(int[] keyBlockSize) {
-    children.setKeySize(keyBlockSize);
-  }
-
   @Override public DataType getSchemaType() {
     return new ArrayType(null, true);
   }
 
-  @Override public int getKeyOrdinalForQuery() {
-    return keyOrdinalForQuery;
-  }
-
-  @Override public void setKeyOrdinalForQuery(int keyOrdinalForQuery) {
-    this.keyOrdinalForQuery = keyOrdinalForQuery;
-  }
-
-  @Override public void fillRequiredBlockData(BlocksChunkHolder blockChunkHolder) {
+  @Override public void fillRequiredBlockData(BlocksChunkHolder blockChunkHolder)
+      throws IOException {
     readBlockDataChunk(blockChunkHolder);
     children.fillRequiredBlockData(blockChunkHolder);
   }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/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
index 0a4c999..d2c6703 100644
--- a/core/src/main/java/org/apache/carbondata/scan/complextypes/ComplexQueryType.java
+++ b/core/src/main/java/org/apache/carbondata/scan/complextypes/ComplexQueryType.java
@@ -19,6 +19,8 @@
  */
 package org.apache.carbondata.scan.complextypes;
 
+import java.io.IOException;
+
 import org.apache.carbondata.core.carbon.datastore.chunk.DimensionColumnDataChunk;
 import org.apache.carbondata.scan.filter.GenericQueryType;
 import org.apache.carbondata.scan.processor.BlocksChunkHolder;
@@ -38,14 +40,6 @@ public class ComplexQueryType {
     this.blockIndex = blockIndex;
   }
 
-  public void fillRequiredBlockData(BlocksChunkHolder blockChunkHolder) {
-    if (null == blockChunkHolder.getDimensionDataChunk()[blockIndex]) {
-      blockChunkHolder.getDimensionDataChunk()[blockIndex] = blockChunkHolder.getDataBlock()
-          .getDimensionChunk(blockChunkHolder.getFileReader(), blockIndex);
-    }
-    children.fillRequiredBlockData(blockChunkHolder);
-  }
-
   /**
    * Method will copy the block chunk holder data to the passed
    * byte[], this method is also used by child
@@ -71,7 +65,7 @@ public class ComplexQueryType {
   /*
    * This method will read the block data chunk from the respective block
    */
-  protected void readBlockDataChunk(BlocksChunkHolder blockChunkHolder) {
+  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/eaadc88a/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
index d5a5acc..979a61b 100644
--- a/core/src/main/java/org/apache/carbondata/scan/complextypes/PrimitiveQueryType.java
+++ b/core/src/main/java/org/apache/carbondata/scan/complextypes/PrimitiveQueryType.java
@@ -22,7 +22,6 @@ package org.apache.carbondata.scan.complextypes;
 import java.io.DataOutputStream;
 import java.io.IOException;
 import java.nio.ByteBuffer;
-import java.util.List;
 
 import org.apache.carbondata.core.cache.dictionary.Dictionary;
 import org.apache.carbondata.core.carbon.datastore.chunk.DimensionColumnDataChunk;
@@ -37,8 +36,6 @@ import org.apache.spark.sql.types.*;
 
 public class PrimitiveQueryType extends ComplexQueryType implements GenericQueryType {
 
-  private int index;
-
   private String name;
   private String parentname;
 
@@ -86,26 +83,6 @@ public class PrimitiveQueryType extends ComplexQueryType implements GenericQuery
 
   }
 
-  @Override public void getAllPrimitiveChildren(List<GenericQueryType> primitiveChild) {
-
-  }
-
-  @Override public int getSurrogateIndex() {
-    return index;
-  }
-
-  @Override public void setSurrogateIndex(int surrIndex) {
-    index = surrIndex;
-  }
-
-  @Override public int getBlockIndex() {
-    return blockIndex;
-  }
-
-  @Override public void setBlockIndex(int blockIndex) {
-    this.blockIndex = blockIndex;
-  }
-
   @Override public int getColsCount() {
     return 1;
   }
@@ -119,14 +96,6 @@ public class PrimitiveQueryType extends ComplexQueryType implements GenericQuery
     dataOutputStream.write(currentVal);
   }
 
-  @Override public void setKeySize(int[] keyBlockSize) {
-    this.keySize = keyBlockSize[this.blockIndex];
-  }
-
-  @Override public void parseAndGetResultBytes(ByteBuffer complexData, DataOutputStream dataOutput)
-      throws IOException {
-  }
-
   @Override public DataType getSchemaType() {
     switch (dataType) {
       case INT:
@@ -146,19 +115,12 @@ public class PrimitiveQueryType extends ComplexQueryType implements GenericQuery
     }
   }
 
-  @Override public int getKeyOrdinalForQuery() {
-    return 0;
-  }
-
-  @Override public void setKeyOrdinalForQuery(int keyOrdinalForQuery) {
-  }
-
-  @Override public void fillRequiredBlockData(BlocksChunkHolder blockChunkHolder) {
+  @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});

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/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
index 12e6436..36d483b 100644
--- a/core/src/main/java/org/apache/carbondata/scan/complextypes/StructQueryType.java
+++ b/core/src/main/java/org/apache/carbondata/scan/complextypes/StructQueryType.java
@@ -40,14 +40,11 @@ public class StructQueryType extends ComplexQueryType implements GenericQueryTyp
   private List<GenericQueryType> children = new ArrayList<GenericQueryType>();
   private String name;
   private String parentname;
-  private int blockIndex;
-  private int keyOrdinalForQuery;
 
   public StructQueryType(String name, String parentname, int blockIndex) {
     super(name, parentname, blockIndex);
     this.name = name;
     this.parentname = parentname;
-    this.blockIndex = blockIndex;
   }
 
   @Override public void addChildren(GenericQueryType newChild) {
@@ -78,33 +75,6 @@ public class StructQueryType extends ComplexQueryType implements GenericQueryTyp
 
   }
 
-  @Override public void getAllPrimitiveChildren(List<GenericQueryType> primitiveChild) {
-    for (int i = 0; i < children.size(); i++) {
-      GenericQueryType child = children.get(i);
-      if (child instanceof PrimitiveQueryType) {
-        primitiveChild.add(child);
-      } else {
-        child.getAllPrimitiveChildren(primitiveChild);
-      }
-    }
-  }
-
-  @Override public int getSurrogateIndex() {
-    return 0;
-  }
-
-  @Override public void setSurrogateIndex(int surrIndex) {
-
-  }
-
-  @Override public int getBlockIndex() {
-    return blockIndex;
-  }
-
-  @Override public void setBlockIndex(int blockIndex) {
-    this.blockIndex = blockIndex;
-  }
-
   @Override public int getColsCount() {
     int colsCount = 1;
     for (int i = 0; i < children.size(); i++) {
@@ -121,9 +91,7 @@ public class StructQueryType extends ComplexQueryType implements GenericQueryTyp
     ByteBuffer byteArray = ByteBuffer.wrap(input);
     int childElement = byteArray.getInt();
     dataOutputStream.writeInt(childElement);
-    if (childElement == 0) {
-      // b.putInt(0);
-    } else {
+    if (childElement > 0){
       for (int i = 0; i < childElement; i++) {
         children.get(i)
             .parseBlocksAndReturnComplexColumnByteArray(dimensionColumnDataChunks, rowNumber,
@@ -132,21 +100,6 @@ public class StructQueryType extends ComplexQueryType implements GenericQueryTyp
     }
   }
 
-  @Override public void parseAndGetResultBytes(ByteBuffer complexData, DataOutputStream dataOutput)
-      throws IOException {
-    int childElement = complexData.getInt();
-    dataOutput.writeInt(childElement);
-    for (int i = 0; i < childElement; i++) {
-      children.get(i).parseAndGetResultBytes(complexData, dataOutput);
-    }
-  }
-
-  @Override public void setKeySize(int[] keyBlockSize) {
-    for (int i = 0; i < children.size(); i++) {
-      children.get(i).setKeySize(keyBlockSize);
-    }
-  }
-
   @Override public DataType getSchemaType() {
     StructField[] fields = new StructField[children.size()];
     for (int i = 0; i < children.size(); i++) {
@@ -156,15 +109,8 @@ public class StructQueryType extends ComplexQueryType implements GenericQueryTyp
     return new StructType(fields);
   }
 
-  @Override public int getKeyOrdinalForQuery() {
-    return keyOrdinalForQuery;
-  }
-
-  @Override public void setKeyOrdinalForQuery(int keyOrdinalForQuery) {
-    this.keyOrdinalForQuery = keyOrdinalForQuery;
-  }
-
-  @Override public void fillRequiredBlockData(BlocksChunkHolder blockChunkHolder) {
+  @Override public void fillRequiredBlockData(BlocksChunkHolder blockChunkHolder)
+      throws IOException {
     readBlockDataChunk(blockChunkHolder);
 
     for (int i = 0; i < children.size(); i++) {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/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
index 1f67c84..949771c 100644
--- a/core/src/main/java/org/apache/carbondata/scan/executor/QueryExecutor.java
+++ b/core/src/main/java/org/apache/carbondata/scan/executor/QueryExecutor.java
@@ -18,6 +18,8 @@
  */
 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;
@@ -35,8 +37,10 @@ public interface QueryExecutor<E> {
    * @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;
+  CarbonIterator<E> execute(QueryModel queryModel)
+      throws QueryExecutionException, IOException;
 
   /**
    * Below method will be used for cleanup

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/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
index 7003184..5634e0f 100644
--- 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
@@ -40,7 +40,6 @@ public class QueryExecutionException extends Exception {
   /**
    * Constructor
    *
-   * @param errorCode The error code for this exception.
    * @param msg       The error message for this exception.
    */
   public QueryExecutionException(String msg) {
@@ -51,7 +50,6 @@ public class QueryExecutionException extends Exception {
   /**
    * Constructor
    *
-   * @param errorCode The error code for this exception.
    * @param msg       The error message for this exception.
    */
   public QueryExecutionException(String msg, Throwable t) {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/executor/impl/AbstractQueryExecutor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/impl/AbstractQueryExecutor.java b/core/src/main/java/org/apache/carbondata/scan/executor/impl/AbstractQueryExecutor.java
index 0ceb80f..deb9179 100644
--- a/core/src/main/java/org/apache/carbondata/scan/executor/impl/AbstractQueryExecutor.java
+++ b/core/src/main/java/org/apache/carbondata/scan/executor/impl/AbstractQueryExecutor.java
@@ -18,6 +18,7 @@
  */
 package org.apache.carbondata.scan.executor.impl;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -46,12 +47,10 @@ import org.apache.carbondata.core.carbon.metadata.schema.table.column.CarbonMeas
 import org.apache.carbondata.core.carbon.querystatistics.QueryStatistic;
 import org.apache.carbondata.core.carbon.querystatistics.QueryStatisticsConstants;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory;
 import org.apache.carbondata.core.keygenerator.KeyGenException;
 import org.apache.carbondata.core.keygenerator.KeyGenerator;
 import org.apache.carbondata.core.util.CarbonTimeStatisticsFactory;
 import org.apache.carbondata.core.util.CarbonUtil;
-import org.apache.carbondata.core.util.CarbonUtilException;
 import org.apache.carbondata.scan.executor.QueryExecutor;
 import org.apache.carbondata.scan.executor.exception.QueryExecutionException;
 import org.apache.carbondata.scan.executor.infos.AggregatorInfo;
@@ -91,7 +90,7 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E> {
    *
    * @param queryModel
    */
-  protected void initQuery(QueryModel queryModel) throws QueryExecutionException {
+  protected void initQuery(QueryModel queryModel) throws IOException {
     StandardLogService.setThreadName(StandardLogService.getPartitionID(
         queryModel.getAbsoluteTableIdentifier().getCarbonTableIdentifier().getTableName()),
         queryModel.getQueryId());
@@ -118,14 +117,10 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E> {
     // remove the invalid table blocks, block which is deleted or compacted
     cache.removeTableBlocks(queryModel.getInvalidSegmentIds(),
         queryModel.getAbsoluteTableIdentifier());
-    try {
-      List<TableBlockUniqueIdentifier> tableBlockUniqueIdentifiers =
-          prepareTableBlockUniqueIdentifier(queryModel.getTableBlockInfos(),
-              queryModel.getAbsoluteTableIdentifier());
-      queryProperties.dataBlocks = cache.getAll(tableBlockUniqueIdentifiers);
-    } catch (CarbonUtilException e) {
-      throw new QueryExecutionException(e);
-    }
+    List<TableBlockUniqueIdentifier> tableBlockUniqueIdentifiers =
+        prepareTableBlockUniqueIdentifier(queryModel.getTableBlockInfos(),
+            queryModel.getAbsoluteTableIdentifier());
+    queryProperties.dataBlocks = cache.getAll(tableBlockUniqueIdentifiers);
     queryStatistic
         .addStatistics(QueryStatisticsConstants.LOAD_BLOCKS_EXECUTOR, System.currentTimeMillis());
     queryProperties.queryStatisticsRecorder.recordStatistics(queryStatistic);
@@ -139,14 +134,12 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E> {
     int aggTypeCount = queryModel.getQueryMeasures().size();
 
     int currentIndex = 0;
-    String[] aggTypes = new String[aggTypeCount];
     DataType[] dataTypes = new DataType[aggTypeCount];
 
     for (QueryMeasure carbonMeasure : queryModel.getQueryMeasures()) {
       // adding the data type and aggregation type of all the measure this
       // can be used
       // to select the aggregator
-      aggTypes[currentIndex] = carbonMeasure.getAggregateFunction();
       dataTypes[currentIndex] = carbonMeasure.getMeasure().getDataType();
       currentIndex++;
     }
@@ -157,8 +150,6 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E> {
     // 3. query measure
     // so calculating the index of the expression start index
     // and measure column start index
-    queryProperties.aggExpressionStartIndex = queryModel.getQueryMeasures().size();
-    queryProperties.measureStartIndex = aggTypes.length - queryModel.getQueryMeasures().size();
     queryProperties.filterMeasures = new HashSet<>();
     queryProperties.complexFilterDimension = new HashSet<>();
     QueryUtil.getAllFilterDimensions(queryModel.getFilterExpressionResolverTree(),
@@ -174,9 +165,6 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E> {
         .addStatistics(QueryStatisticsConstants.LOAD_DICTIONARY, System.currentTimeMillis());
     queryProperties.queryStatisticsRecorder.recordStatistics(queryStatistic);
     queryModel.setColumnToDictionaryMapping(queryProperties.columnToDictionayMapping);
-    // setting the sort dimension index. as it will be updated while getting the sort info
-    // so currently setting it to default 0 means sort is not present in any dimension
-    queryProperties.sortDimIndexes = new byte[queryModel.getQueryDimension().size()];
   }
 
   private List<TableBlockUniqueIdentifier> prepareTableBlockUniqueIdentifier(
@@ -202,9 +190,6 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E> {
     int[] maskByteRanges =
         QueryUtil.getMaskedByteRange(queryModel.getQueryDimension(), keyGenerator);
 
-    // getting the masked bytes for query dimension dictionary column
-    int[] maskedBytes = QueryUtil.getMaskedByte(keyGenerator.getKeySizeInBytes(), maskByteRanges);
-
     // max key for the dictionary dimension present in the query
     byte[] maxKey = null;
     try {
@@ -218,13 +203,12 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E> {
     KeyStructureInfo restructureInfos = new KeyStructureInfo();
     restructureInfos.setKeyGenerator(keyGenerator);
     restructureInfos.setMaskByteRanges(maskByteRanges);
-    restructureInfos.setMaskedBytes(maskedBytes);
     restructureInfos.setMaxKey(maxKey);
     return restructureInfos;
   }
 
   protected List<BlockExecutionInfo> getBlockExecutionInfos(QueryModel queryModel)
-      throws QueryExecutionException {
+      throws IOException, QueryExecutionException {
     initQuery(queryModel);
     List<BlockExecutionInfo> blockExecutionInfoList = new ArrayList<BlockExecutionInfo>();
     // fill all the block execution infos for all the blocks selected in
@@ -237,8 +221,6 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E> {
               queryModel.getTableBlockInfos().get(i).getBlockletInfos()
                   .getNumberOfBlockletToScan()));
     }
-    queryProperties.complexDimensionInfoMap =
-        blockExecutionInfoList.get(blockExecutionInfoList.size() - 1).getComlexDimensionInfoMap();
     if (null != queryModel.getStatisticsRecorder()) {
       QueryStatistic queryStatistic = new QueryStatistic();
       queryStatistic.addCountStatistic(QueryStatisticsConstants.SCAN_BLOCKS_NUM,
@@ -285,12 +267,6 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E> {
     blockExecutionInfo.setBlockKeyGenerator(blockKeyGenerator);
     // adding aggregation info for query
     blockExecutionInfo.setAggregatorInfo(getAggregatorInfoForBlock(queryModel, blockIndex));
-    // adding query statistics list to record the statistics
-    blockExecutionInfo.setStatisticsRecorder(queryProperties.queryStatisticsRecorder);
-    // setting the limit
-    blockExecutionInfo.setLimit(queryModel.getLimit());
-    // setting whether detail query or not
-    blockExecutionInfo.setDetailQuery(queryModel.isDetailQuery());
     // setting whether raw record query or not
     blockExecutionInfo.setRawRecordDetailQuery(queryModel.isForcedDetailRawQuery());
     // setting the masked byte of the block which will be
@@ -318,8 +294,7 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E> {
               blockExecutionInfo.getComlexDimensionInfoMap()));
       List<IndexKey> listOfStartEndKeys = new ArrayList<IndexKey>(2);
       FilterUtil.traverseResolverTreeAndGetStartAndEndKey(segmentProperties,
-          queryModel.getAbsoluteTableIdentifier(), queryModel.getFilterExpressionResolverTree(),
-          listOfStartEndKeys);
+          queryModel.getFilterExpressionResolverTree(), listOfStartEndKeys);
       startIndexKey = listOfStartEndKeys.get(0);
       endIndexKey = listOfStartEndKeys.get(1);
     } else {
@@ -330,8 +305,6 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E> {
         throw new QueryExecutionException(e);
       }
     }
-    blockExecutionInfo.setFileType(
-        FileFactory.getFileType(queryModel.getAbsoluteTableIdentifier().getStorePath()));
     //setting the start index key of the block node
     blockExecutionInfo.setStartKey(startIndexKey);
     //setting the end index key of the block node
@@ -462,10 +435,6 @@ public abstract class AbstractQueryExecutor<E> implements QueryExecutor<E> {
     AggregatorInfo aggregatorInfos = RestructureUtil
         .getAggregatorInfos(queryModel.getQueryMeasures(),
             tableBlock.getSegmentProperties().getMeasures());
-    // setting the index of expression in measure aggregators
-    aggregatorInfos.setExpressionAggregatorStartIndex(queryProperties.aggExpressionStartIndex);
-    // setting the index of measure columns in measure aggregators
-    aggregatorInfos.setMeasureAggregatorStartIndex(queryProperties.measureStartIndex);
     // setting the measure aggregator for all aggregation function selected
     // in query
     aggregatorInfos.setMeasureDataTypes(queryProperties.measureDataTypes);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/executor/impl/DetailQueryExecutor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/impl/DetailQueryExecutor.java b/core/src/main/java/org/apache/carbondata/scan/executor/impl/DetailQueryExecutor.java
index 7e0f5a9..92e7fc8 100644
--- a/core/src/main/java/org/apache/carbondata/scan/executor/impl/DetailQueryExecutor.java
+++ b/core/src/main/java/org/apache/carbondata/scan/executor/impl/DetailQueryExecutor.java
@@ -18,6 +18,7 @@
  */
 package org.apache.carbondata.scan.executor.impl;
 
+import java.io.IOException;
 import java.util.List;
 
 import org.apache.carbondata.common.CarbonIterator;
@@ -36,7 +37,7 @@ public class DetailQueryExecutor extends AbstractQueryExecutor<BatchResult> {
 
   @Override
   public CarbonIterator<BatchResult> execute(QueryModel queryModel)
-      throws QueryExecutionException {
+      throws QueryExecutionException, IOException {
     List<BlockExecutionInfo> blockExecutionInfoList = getBlockExecutionInfos(queryModel);
     return new DetailQueryResultIterator(
         blockExecutionInfoList,

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/executor/impl/QueryExecutorProperties.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/impl/QueryExecutorProperties.java b/core/src/main/java/org/apache/carbondata/scan/executor/impl/QueryExecutorProperties.java
index bf61be2..c18e8c9 100644
--- a/core/src/main/java/org/apache/carbondata/scan/executor/impl/QueryExecutorProperties.java
+++ b/core/src/main/java/org/apache/carbondata/scan/executor/impl/QueryExecutorProperties.java
@@ -30,7 +30,6 @@ import org.apache.carbondata.core.carbon.metadata.schema.table.column.CarbonDime
 import org.apache.carbondata.core.carbon.metadata.schema.table.column.CarbonMeasure;
 import org.apache.carbondata.core.carbon.querystatistics.QueryStatisticsRecorder;
 import org.apache.carbondata.scan.executor.infos.KeyStructureInfo;
-import org.apache.carbondata.scan.filter.GenericQueryType;
 
 /**
  * Holds all the properties required for query execution
@@ -42,25 +41,6 @@ public class QueryExecutorProperties {
    * dictionary key
    */
   public KeyStructureInfo keyStructureInfo;
-  /**
-   * as we have multiple type of column aggregation like
-   * dimension,expression,measure so this will be used to for getting the
-   * measure aggregation start index
-   */
-  public int measureStartIndex;
-  /**
-   * query like count(1),count(*) ,etc will used this parameter
-   */
-  public boolean isFunctionQuery;
-  /**
-   * aggExpressionStartIndex
-   */
-  public int aggExpressionStartIndex;
-  /**
-   * index of the dimension which is present in the order by
-   * in a query
-   */
-  public byte[] sortDimIndexes;
 
   /**
    * this will hold the information about the dictionary dimension
@@ -73,10 +53,6 @@ public class QueryExecutorProperties {
    */
   public DataType[] measureDataTypes;
   /**
-   * complex parent index to query mapping
-   */
-  public Map<Integer, GenericQueryType> complexDimensionInfoMap;
-  /**
    * all the complex dimension which is on filter
    */
   public Set<CarbonDimension> complexFilterDimension;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/executor/impl/VectorDetailQueryExecutor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/impl/VectorDetailQueryExecutor.java b/core/src/main/java/org/apache/carbondata/scan/executor/impl/VectorDetailQueryExecutor.java
index 884a1eb..1f1dd7d 100644
--- a/core/src/main/java/org/apache/carbondata/scan/executor/impl/VectorDetailQueryExecutor.java
+++ b/core/src/main/java/org/apache/carbondata/scan/executor/impl/VectorDetailQueryExecutor.java
@@ -18,6 +18,7 @@
  */
 package org.apache.carbondata.scan.executor.impl;
 
+import java.io.IOException;
 import java.util.List;
 
 import org.apache.carbondata.common.CarbonIterator;
@@ -31,8 +32,9 @@ import org.apache.carbondata.scan.result.iterator.VectorDetailQueryResultIterato
  */
 public class VectorDetailQueryExecutor extends AbstractQueryExecutor<Object> {
 
-  @Override public CarbonIterator<Object> execute(QueryModel queryModel)
-      throws QueryExecutionException {
+  @Override
+  public CarbonIterator<Object> execute(QueryModel queryModel)
+      throws QueryExecutionException, IOException {
     List<BlockExecutionInfo> blockExecutionInfoList = getBlockExecutionInfos(queryModel);
     return new VectorDetailQueryResultIterator(
         blockExecutionInfoList,

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/executor/infos/AggregatorInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/infos/AggregatorInfo.java b/core/src/main/java/org/apache/carbondata/scan/executor/infos/AggregatorInfo.java
index 3a2c356..f4f0fe5 100644
--- a/core/src/main/java/org/apache/carbondata/scan/executor/infos/AggregatorInfo.java
+++ b/core/src/main/java/org/apache/carbondata/scan/executor/infos/AggregatorInfo.java
@@ -49,22 +49,6 @@ public class AggregatorInfo {
   private Object[] defaultValues;
 
   /**
-   * In carbon there are three type of aggregation
-   * (dimension aggregation, expression aggregation and measure aggregation)
-   * Below index will be used to set the start position of expression in measures
-   * aggregator array
-   */
-  private int expressionAggregatorStartIndex;
-
-  /**
-   * In carbon there are three type of aggregation
-   * (dimension aggregation, expression aggregation and measure aggregation)
-   * Below index will be used to set the start position of measures in measures
-   * aggregator array
-   */
-  private int measureAggregatorStartIndex;
-
-  /**
    * Datatype of each measure;
    */
   private DataType[] measureDataTypes;
@@ -111,34 +95,6 @@ public class AggregatorInfo {
     this.defaultValues = defaultValues;
   }
 
-  /**
-   * @return the expressionAggregatorStartIndex
-   */
-  public int getExpressionAggregatorStartIndex() {
-    return expressionAggregatorStartIndex;
-  }
-
-  /**
-   * @param expressionAggregatorStartIndex the expressionAggregatorStartIndex to set
-   */
-  public void setExpressionAggregatorStartIndex(int expressionAggregatorStartIndex) {
-    this.expressionAggregatorStartIndex = expressionAggregatorStartIndex;
-  }
-
-  /**
-   * @return the measureAggregatorStartIndex
-   */
-  public int getMeasureAggregatorStartIndex() {
-    return measureAggregatorStartIndex;
-  }
-
-  /**
-   * @param measureAggregatorStartIndex the measureAggregatorStartIndex to set
-   */
-  public void setMeasureAggregatorStartIndex(int measureAggregatorStartIndex) {
-    this.measureAggregatorStartIndex = measureAggregatorStartIndex;
-  }
-
   public DataType[] getMeasureDataTypes() {
     return measureDataTypes;
   }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/executor/infos/BlockExecutionInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/infos/BlockExecutionInfo.java b/core/src/main/java/org/apache/carbondata/scan/executor/infos/BlockExecutionInfo.java
index 12ed20f..2d31448 100644
--- a/core/src/main/java/org/apache/carbondata/scan/executor/infos/BlockExecutionInfo.java
+++ b/core/src/main/java/org/apache/carbondata/scan/executor/infos/BlockExecutionInfo.java
@@ -24,8 +24,6 @@ import org.apache.carbondata.core.cache.dictionary.Dictionary;
 import org.apache.carbondata.core.carbon.datastore.DataRefNode;
 import org.apache.carbondata.core.carbon.datastore.IndexKey;
 import org.apache.carbondata.core.carbon.datastore.block.AbstractIndex;
-import org.apache.carbondata.core.carbon.querystatistics.QueryStatisticsRecorder;
-import org.apache.carbondata.core.datastorage.store.impl.FileFactory.FileType;
 import org.apache.carbondata.core.keygenerator.KeyGenerator;
 import org.apache.carbondata.scan.filter.GenericQueryType;
 import org.apache.carbondata.scan.filter.executer.FilterExecuter;
@@ -52,26 +50,6 @@ public class BlockExecutionInfo {
   private boolean isFixedKeyUpdateRequired;
 
   /**
-   * in case of detail+order by query when number of output record is same we
-   * need to store data in the disk, so for this check will be used to whether
-   * we can write in the disk or not
-   */
-  private boolean isFileBasedQuery;
-
-  /**
-   * id of the query. this will be used to create directory while writing the
-   * data file in case of detail+order by query
-   */
-  private String queryId;
-
-  /**
-   * this to handle limit query in case of detail query we are pushing down
-   * the limit to executor level so based on the number of limit we can
-   * process only that many records
-   */
-  private int limit;
-
-  /**
    * below to store all the information required for aggregation during query
    * execution
    */
@@ -99,11 +77,6 @@ public class BlockExecutionInfo {
   private int[] maskedByteForBlock;
 
   /**
-   * flag to check whether query is detail query or aggregation query
-   */
-  private boolean isDetailQuery;
-
-  /**
    * total number of dimension in block
    */
   private int totalNumberDimensionBlock;
@@ -130,11 +103,6 @@ public class BlockExecutionInfo {
   private KeyStructureInfo keyStructureInfo;
 
   /**
-   * below will be used to sort the data based
-   */
-  private SortInfo sortInfo;
-
-  /**
    * first block from which query execution will start
    */
   private DataRefNode firstDataBlock;
@@ -169,11 +137,6 @@ public class BlockExecutionInfo {
   private int[] eachColumnValueSize;
 
   /**
-   * partition number
-   */
-  private String partitionId;
-
-  /**
    * column group block index in file to key structure info mapping
    */
   private Map<Integer, KeyStructureInfo> columnGroupToKeyStructureInfo;
@@ -190,11 +153,6 @@ public class BlockExecutionInfo {
   private FilterExecuter filterExecuterTree;
 
   /**
-   * fileType
-   */
-  private FileType fileType;
-
-  /**
    * whether it needs only raw byte records with out aggregation.
    */
   private boolean isRawRecordDetailQuery;
@@ -220,11 +178,6 @@ public class BlockExecutionInfo {
   private int[] complexColumnParentBlockIndexes;
 
   /**
-   * to record the statistics
-   */
-  private QueryStatisticsRecorder statisticsRecorder;
-
-  /**
    * @return the tableBlock
    */
   public AbstractIndex getDataBlock() {
@@ -268,48 +221,6 @@ public class BlockExecutionInfo {
   }
 
   /**
-   * @return the isFileBasedQuery
-   */
-  public boolean isFileBasedQuery() {
-    return isFileBasedQuery;
-  }
-
-  /**
-   * @param isFileBasedQuery the isFileBasedQuery to set
-   */
-  public void setFileBasedQuery(boolean isFileBasedQuery) {
-    this.isFileBasedQuery = isFileBasedQuery;
-  }
-
-  /**
-   * @return the queryId
-   */
-  public String getQueryId() {
-    return queryId;
-  }
-
-  /**
-   * @param queryId the queryId to set
-   */
-  public void setQueryId(String queryId) {
-    this.queryId = queryId;
-  }
-
-  /**
-   * @return the limit
-   */
-  public int getLimit() {
-    return limit;
-  }
-
-  /**
-   * @param limit the limit to set
-   */
-  public void setLimit(int limit) {
-    this.limit = limit;
-  }
-
-  /**
    * @return the aggregatorInfos
    */
   public AggregatorInfo getAggregatorInfo() {
@@ -368,20 +279,6 @@ public class BlockExecutionInfo {
   }
 
   /**
-   * @return the isDetailQuery
-   */
-  public boolean isDetailQuery() {
-    return isDetailQuery;
-  }
-
-  /**
-   * @param isDetailQuery the isDetailQuery to set
-   */
-  public void setDetailQuery(boolean isDetailQuery) {
-    this.isDetailQuery = isDetailQuery;
-  }
-
-  /**
    * @return the totalNumberDimensionBlock
    */
   public int getTotalNumberDimensionBlock() {
@@ -452,20 +349,6 @@ public class BlockExecutionInfo {
   }
 
   /**
-   * @return the sortInfos
-   */
-  public SortInfo getSortInfo() {
-    return sortInfo;
-  }
-
-  /**
-   * @param sortInfo the sortInfos to set
-   */
-  public void setSortInfo(SortInfo sortInfo) {
-    this.sortInfo = sortInfo;
-  }
-
-  /**
    * @return the firstDataBlock
    */
   public DataRefNode getFirstDataBlock() {
@@ -550,20 +433,6 @@ public class BlockExecutionInfo {
   }
 
   /**
-   * @return the partitionId
-   */
-  public String getPartitionId() {
-    return partitionId;
-  }
-
-  /**
-   * @param partitionId the partitionId to set
-   */
-  public void setPartitionId(String partitionId) {
-    this.partitionId = partitionId;
-  }
-
-  /**
    * @return the dictionaryColumnBlockIndex
    */
   public int[] getDictionaryColumnBlockIndex() {
@@ -607,33 +476,12 @@ public class BlockExecutionInfo {
   }
 
   /**
-   * @return the columnIdToDcitionaryMapping
-   */
-  public Map<String, Dictionary> getColumnIdToDcitionaryMapping() {
-    return columnIdToDcitionaryMapping;
-  }
-
-  /**
    * @param columnIdToDcitionaryMapping the columnIdToDcitionaryMapping to set
    */
   public void setColumnIdToDcitionaryMapping(Map<String, Dictionary> columnIdToDcitionaryMapping) {
     this.columnIdToDcitionaryMapping = columnIdToDcitionaryMapping;
   }
 
-  /**
-   * @return the fileType
-   */
-  public FileType getFileType() {
-    return fileType;
-  }
-
-  /**
-   * @param fileType the fileType to set
-   */
-  public void setFileType(FileType fileType) {
-    this.fileType = fileType;
-  }
-
   public boolean isRawRecordDetailQuery() {
     return isRawRecordDetailQuery;
   }
@@ -670,14 +518,6 @@ public class BlockExecutionInfo {
     this.complexColumnParentBlockIndexes = complexColumnParentBlockIndexes;
   }
 
-  public QueryStatisticsRecorder getStatisticsRecorder() {
-    return statisticsRecorder;
-  }
-
-  public void setStatisticsRecorder(QueryStatisticsRecorder statisticsRecorder) {
-    this.statisticsRecorder = statisticsRecorder;
-  }
-
   public QueryDimension[] getQueryDimensions() {
     return queryDimensions;
   }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/executor/infos/KeyStructureInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/infos/KeyStructureInfo.java b/core/src/main/java/org/apache/carbondata/scan/executor/infos/KeyStructureInfo.java
index ad3ff5f..d742e02 100644
--- a/core/src/main/java/org/apache/carbondata/scan/executor/infos/KeyStructureInfo.java
+++ b/core/src/main/java/org/apache/carbondata/scan/executor/infos/KeyStructureInfo.java
@@ -39,11 +39,6 @@ public class KeyStructureInfo {
   private int[] maskByteRanges;
 
   /**
-   * masked bytes of the query
-   */
-  private int[] maskedBytes;
-
-  /**
    * max key for query execution
    */
   private byte[] maxKey;
@@ -82,20 +77,6 @@ public class KeyStructureInfo {
   }
 
   /**
-   * @return the maskedBytes
-   */
-  public int[] getMaskedBytes() {
-    return maskedBytes;
-  }
-
-  /**
-   * @param maskedBytes the maskedBytes to set
-   */
-  public void setMaskedBytes(int[] maskedBytes) {
-    this.maskedBytes = maskedBytes;
-  }
-
-  /**
    * @return the maxKey
    */
   public byte[] getMaxKey() {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/executor/infos/SortInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/infos/SortInfo.java b/core/src/main/java/org/apache/carbondata/scan/executor/infos/SortInfo.java
deleted file mode 100644
index 457e185..0000000
--- a/core/src/main/java/org/apache/carbondata/scan/executor/infos/SortInfo.java
+++ /dev/null
@@ -1,125 +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.infos;
-
-import java.util.List;
-
-import org.apache.carbondata.scan.model.QueryDimension;
-
-/**
- * Below class holds the order by information about the query
- */
-public class SortInfo {
-
-  /**
-   * sorting order of a dimension
-   */
-  private byte[] dimensionSortOrder;
-
-  /**
-   * byte range of each dimension present in the order by
-   */
-  private int[][] maskedByteRangeForSorting;
-
-  /**
-   * dimension indexes which is used in order bye
-   */
-  private byte[] sortDimensionIndex;
-
-  /**
-   * mask key of each dimension
-   * this will be used to sort the dimension
-   */
-  private byte[][] dimensionMaskKeyForSorting;
-
-  /**
-   * sortDimension
-   */
-  private List<QueryDimension> sortDimension;
-
-  /**
-   * @return the dimensionSortOrder
-   */
-  public byte[] getDimensionSortOrder() {
-    return dimensionSortOrder;
-  }
-
-  /**
-   * @param dimensionSortOrder the dimensionSortOrder to set
-   */
-  public void setDimensionSortOrder(byte[] dimensionSortOrder) {
-    this.dimensionSortOrder = dimensionSortOrder;
-  }
-
-  /**
-   * @return the maskedByteRangeForSorting
-   */
-  public int[][] getMaskedByteRangeForSorting() {
-    return maskedByteRangeForSorting;
-  }
-
-  /**
-   * @param maskedByteRangeForSorting the maskedByteRangeForSorting to set
-   */
-  public void setMaskedByteRangeForSorting(int[][] maskedByteRangeForSorting) {
-    this.maskedByteRangeForSorting = maskedByteRangeForSorting;
-  }
-
-  /**
-   * @return the sortDimensionIndex
-   */
-  public byte[] getSortDimensionIndex() {
-    return sortDimensionIndex;
-  }
-
-  /**
-   * @param sortDimensionIndex the sortDimensionIndex to set
-   */
-  public void setSortDimensionIndex(byte[] sortDimensionIndex) {
-    this.sortDimensionIndex = sortDimensionIndex;
-  }
-
-  /**
-   * @return the dimensionMaskKeyForSorting
-   */
-  public byte[][] getDimensionMaskKeyForSorting() {
-    return dimensionMaskKeyForSorting;
-  }
-
-  /**
-   * @param dimensionMaskKeyForSorting the dimensionMaskKeyForSorting to set
-   */
-  public void setDimensionMaskKeyForSorting(byte[][] dimensionMaskKeyForSorting) {
-    this.dimensionMaskKeyForSorting = dimensionMaskKeyForSorting;
-  }
-
-  /**
-   * @return the sortDimension
-   */
-  public List<QueryDimension> getSortDimension() {
-    return sortDimension;
-  }
-
-  /**
-   * @param sortDimension the sortDimension to set
-   */
-  public void setSortDimension(List<QueryDimension> sortDimension) {
-    this.sortDimension = sortDimension;
-  }
-}

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/executor/util/QueryUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/executor/util/QueryUtil.java b/core/src/main/java/org/apache/carbondata/scan/executor/util/QueryUtil.java
index 9fdb9ae..3fd81f8 100644
--- a/core/src/main/java/org/apache/carbondata/scan/executor/util/QueryUtil.java
+++ b/core/src/main/java/org/apache/carbondata/scan/executor/util/QueryUtil.java
@@ -18,6 +18,7 @@
  */
 package org.apache.carbondata.scan.executor.util;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Collections;
@@ -49,11 +50,9 @@ import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.core.keygenerator.KeyGenException;
 import org.apache.carbondata.core.keygenerator.KeyGenerator;
 import org.apache.carbondata.core.util.CarbonUtil;
-import org.apache.carbondata.core.util.CarbonUtilException;
 import org.apache.carbondata.scan.complextypes.ArrayQueryType;
 import org.apache.carbondata.scan.complextypes.PrimitiveQueryType;
 import org.apache.carbondata.scan.complextypes.StructQueryType;
-import org.apache.carbondata.scan.executor.exception.QueryExecutionException;
 import org.apache.carbondata.scan.executor.infos.KeyStructureInfo;
 import org.apache.carbondata.scan.expression.ColumnExpression;
 import org.apache.carbondata.scan.expression.Expression;
@@ -261,11 +260,11 @@ public class QueryUtil {
    *                                convert the result from surrogate key to actual data
    * @param absoluteTableIdentifier absolute table identifier
    * @return dimension unique id to its dictionary map
-   * @throws QueryExecutionException
+   * @throws IOException
    */
   public static Map<String, Dictionary> getDimensionDictionaryDetail(
       List<QueryDimension> queryDimensions, Set<CarbonDimension> filterComplexDimensions,
-      AbsoluteTableIdentifier absoluteTableIdentifier) throws QueryExecutionException {
+      AbsoluteTableIdentifier absoluteTableIdentifier) throws IOException {
     // to store dimension unique column id list, this is required as
     // dimension can be present in
     // query dimension, as well as some aggregation function will be applied
@@ -327,10 +326,10 @@ public class QueryUtil {
    * @param dictionaryColumnIdList  dictionary column list
    * @param absoluteTableIdentifier absolute table identifier
    * @return dictionary mapping
-   * @throws QueryExecutionException
+   * @throws IOException
    */
   private static Map<String, Dictionary> getDictionaryMap(List<String> dictionaryColumnIdList,
-      AbsoluteTableIdentifier absoluteTableIdentifier) throws QueryExecutionException {
+      AbsoluteTableIdentifier absoluteTableIdentifier) throws IOException {
     // this for dictionary unique identifier
     List<DictionaryColumnUniqueIdentifier> dictionaryColumnUniqueIdentifiers =
         getDictionaryColumnUniqueIdentifierList(dictionaryColumnIdList,
@@ -338,12 +337,9 @@ public class QueryUtil {
     CacheProvider cacheProvider = CacheProvider.getInstance();
     Cache<DictionaryColumnUniqueIdentifier, Dictionary> forwardDictionaryCache = cacheProvider
         .createCache(CacheType.FORWARD_DICTIONARY, absoluteTableIdentifier.getStorePath());
-    List<Dictionary> columnDictionaryList;
-    try {
-      columnDictionaryList = forwardDictionaryCache.getAll(dictionaryColumnUniqueIdentifiers);
-    } catch (CarbonUtilException e) {
-      throw new QueryExecutionException(e);
-    }
+
+    List<Dictionary> columnDictionaryList =
+        forwardDictionaryCache.getAll(dictionaryColumnUniqueIdentifiers);
     Map<String, Dictionary> columnDictionaryMap = new HashMap<>(columnDictionaryList.size());
     for (int i = 0; i < dictionaryColumnUniqueIdentifiers.size(); i++) {
       // TODO: null check for column dictionary, if cache size is less it
@@ -361,8 +357,7 @@ public class QueryUtil {
    * @return
    */
   private static List<DictionaryColumnUniqueIdentifier> getDictionaryColumnUniqueIdentifierList(
-      List<String> dictionaryColumnIdList, CarbonTableIdentifier carbonTableIdentifier)
-      throws QueryExecutionException {
+      List<String> dictionaryColumnIdList, CarbonTableIdentifier carbonTableIdentifier) {
     CarbonTable carbonTable =
         CarbonMetadata.getInstance().getCarbonTable(carbonTableIdentifier.getTableUniqueName());
     List<DictionaryColumnUniqueIdentifier> dictionaryColumnUniqueIdentifiers =
@@ -370,13 +365,15 @@ public class QueryUtil {
     for (String columnId : dictionaryColumnIdList) {
       CarbonDimension dimension = CarbonMetadata.getInstance()
           .getCarbonDimensionBasedOnColIdentifier(carbonTable, columnId);
-      if (null == dimension) {
-        throw new QueryExecutionException("The column id " + columnId + " could not be resolved.");
+      if (dimension != null) {
+        dictionaryColumnUniqueIdentifiers.add(
+            new DictionaryColumnUniqueIdentifier(
+                carbonTableIdentifier,
+                dimension.getColumnIdentifier(),
+                dimension.getDataType()
+            )
+        );
       }
-      DictionaryColumnUniqueIdentifier dictionaryColumnUniqueIdentifier =
-          new DictionaryColumnUniqueIdentifier(carbonTableIdentifier,
-              dimension.getColumnIdentifier(), dimension.getDataType());
-      dictionaryColumnUniqueIdentifiers.add(dictionaryColumnUniqueIdentifier);
     }
     return dictionaryColumnUniqueIdentifiers;
   }
@@ -411,103 +408,6 @@ public class QueryUtil {
   }
 
   /**
-   * Below method will be used to get the masked byte range for dimension
-   * which is present in order by
-   *
-   * @param orderByDimensions order by dimension
-   * @param generator         key generator
-   * @param maskedRanges      masked byte range for dimension
-   * @return range of masked byte for order by dimension
-   */
-  public static int[][] getMaskedByteRangeForSorting(List<QueryDimension> orderByDimensions,
-      KeyGenerator generator, int[] maskedRanges) {
-    int[][] dimensionCompareIndex = new int[orderByDimensions.size()][];
-    int index = 0;
-    for (int i = 0; i < dimensionCompareIndex.length; i++) {
-      Set<Integer> integers = new TreeSet<Integer>();
-      if (!orderByDimensions.get(i).getDimension().getEncoder().contains(Encoding.DICTIONARY)
-          || orderByDimensions.get(i).getDimension().numberOfChild() > 0) {
-        continue;
-      }
-      int[] range =
-          generator.getKeyByteOffsets(orderByDimensions.get(i).getDimension().getKeyOrdinal());
-      for (int j = range[0]; j <= range[1]; j++) {
-        integers.add(j);
-      }
-      dimensionCompareIndex[index] = new int[integers.size()];
-      int j = 0;
-      for (Iterator<Integer> iterator = integers.iterator(); iterator.hasNext(); ) {
-        Integer integer = (Integer) iterator.next();
-        dimensionCompareIndex[index][j++] = integer.intValue();
-      }
-      index++;
-    }
-    for (int i = 0; i < dimensionCompareIndex.length; i++) {
-      if (null == dimensionCompareIndex[i]) {
-        continue;
-      }
-      int[] range = dimensionCompareIndex[i];
-      if (null != range) {
-        for (int j = 0; j < range.length; j++) {
-          for (int k = 0; k < maskedRanges.length; k++) {
-            if (range[j] == maskedRanges[k]) {
-              range[j] = k;
-              break;
-            }
-          }
-        }
-      }
-
-    }
-    return dimensionCompareIndex;
-  }
-
-  /**
-   * Below method will be used to get the masked key for sorting
-   *
-   * @param orderDimensions           query dimension
-   * @param generator                 key generator
-   * @param maskedByteRangeForSorting masked byte range for sorting
-   * @param maskedRanges              masked range
-   * @return masked byte range
-   * @throws QueryExecutionException
-   */
-  public static byte[][] getMaksedKeyForSorting(List<QueryDimension> orderDimensions,
-      KeyGenerator generator, int[][] maskedByteRangeForSorting, int[] maskedRanges)
-      throws QueryExecutionException {
-    byte[][] maskedKey = new byte[orderDimensions.size()][];
-    byte[] mdKey = null;
-    long[] key = null;
-    byte[] maskedMdKey = null;
-    try {
-      if (null != maskedByteRangeForSorting) {
-        for (int i = 0; i < maskedByteRangeForSorting.length; i++) {
-          if (null == maskedByteRangeForSorting[i]) {
-            continue;
-          }
-          key = new long[generator.getDimCount()];
-          maskedKey[i] = new byte[maskedByteRangeForSorting[i].length];
-          key[orderDimensions.get(i).getDimension().getKeyOrdinal()] = Long.MAX_VALUE;
-          mdKey = generator.generateKey(key);
-          maskedMdKey = new byte[maskedRanges.length];
-          for (int k = 0; k < maskedMdKey.length; k++) { // CHECKSTYLE:OFF
-            // Approval
-            // No:Approval-V1R2C10_001
-            maskedMdKey[k] = mdKey[maskedRanges[k]];
-          }
-          for (int j = 0; j < maskedByteRangeForSorting[i].length; j++) {
-            maskedKey[i][j] = maskedMdKey[maskedByteRangeForSorting[i][j]];
-          }// CHECKSTYLE:ON
-
-        }
-      }
-    } catch (KeyGenException e) {
-      throw new QueryExecutionException(e);
-    }
-    return maskedKey;
-  }
-
-  /**
    * Below method will be used to get mapping whether dimension is present in
    * order by or not
    *
@@ -568,12 +468,9 @@ public class QueryUtil {
       int[] maskByteRanges = getMaskedByteRangeBasedOrdinal(mdKeyOrdinal, keyGenerator);
       // max key for column group
       byte[] maxKey = getMaxKeyBasedOnOrinal(mdKeyOrdinal, keyGenerator);
-      // get masked key for column group
-      int[] maksedByte = getMaskedByte(keyGenerator.getKeySizeInBytes(), maskByteRanges);
       restructureInfos.setKeyGenerator(keyGenerator);
       restructureInfos.setMaskByteRanges(maskByteRanges);
       restructureInfos.setMaxKey(maxKey);
-      restructureInfos.setMaskedBytes(maksedByte);
       restructureInfos.setMdkeyQueryDimensionOrdinal(ArrayUtils
           .toPrimitive(mdKeyOrdinalForQuery.toArray(new Integer[mdKeyOrdinalForQuery.size()])));
       rowGroupToItsRSInfo
@@ -728,11 +625,6 @@ public class QueryUtil {
       queryDimension
           .setDimension(carbonTable.getDimensionByName(tableName, queryDimension.getColumnName()));
     }
-    // resolve sort dimension
-    for (QueryDimension sortDimension : queryModel.getSortDimension()) {
-      sortDimension
-          .setDimension(carbonTable.getDimensionByName(tableName, sortDimension.getColumnName()));
-    }
     // resolve query measure
     for (QueryMeasure queryMeasure : queryModel.getQueryMeasures()) {
       // in case of count start column name will  be count * so
@@ -761,23 +653,6 @@ public class QueryUtil {
   }
 
   /**
-   * Below method will be used to get the index of number type aggregator
-   *
-   * @param aggType
-   * @return index in aggregator
-   */
-  public static int[] getNumberTypeIndex(List<String> aggType) {
-    List<Integer> indexList = new ArrayList<Integer>();
-    for (int i = 0; i < aggType.size(); i++) {
-      if (CarbonCommonConstants.SUM.equals(aggType.get(i)) || CarbonCommonConstants.AVERAGE
-          .equals(aggType.get(i))) {
-        indexList.add(i);
-      }
-    }
-    return ArrayUtils.toPrimitive(indexList.toArray(new Integer[indexList.size()]));
-  }
-
-  /**
    * below method will be used to get the actual type aggregator
    *
    * @param aggType
@@ -812,12 +687,10 @@ public class QueryUtil {
         .getColumnGroupMdKeyOrdinal(colGrpId, dimColumnEvaluatorInfo.getColumnIndex()));
     int[] maskByteRanges = QueryUtil.getMaskedByteRangeBasedOrdinal(mdKeyOrdinal, keyGenerator);
     byte[] maxKey = QueryUtil.getMaxKeyBasedOnOrinal(mdKeyOrdinal, keyGenerator);
-    int[] maksedByte = QueryUtil.getMaskedByte(keyGenerator.getKeySizeInBytes(), maskByteRanges);
     KeyStructureInfo restructureInfos = new KeyStructureInfo();
     restructureInfos.setKeyGenerator(keyGenerator);
     restructureInfos.setMaskByteRanges(maskByteRanges);
     restructureInfos.setMaxKey(maxKey);
-    restructureInfos.setMaskedBytes(maksedByte);
     return restructureInfos;
   }
 
@@ -872,7 +745,7 @@ public class QueryUtil {
     return complexTypeMap;
   }
 
-  private static GenericQueryType fillParentDetails(Map<Integer, Integer> dimensionToBlockIndexMap,
+  private static void fillParentDetails(Map<Integer, Integer> dimensionToBlockIndexMap,
       CarbonDimension dimension, Map<Integer, GenericQueryType> complexTypeMap,
       int[] eachComplexColumnValueSize, Map<String, Dictionary> columnIdToDictionaryMap) {
     int parentBlockIndex = dimensionToBlockIndexMap.get(dimension.getOrdinal());
@@ -884,7 +757,6 @@ public class QueryUtil {
     parentBlockIndex =
         fillChildrenDetails(eachComplexColumnValueSize, columnIdToDictionaryMap, parentBlockIndex,
             dimension, parentQueryType);
-    return parentQueryType;
   }
 
   private static int fillChildrenDetails(int[] eachComplexColumnValueSize,
@@ -942,9 +814,6 @@ public class QueryUtil {
    * This method will check if a given expression contains a column expression
    * recursively and add the dimension instance to the set which holds the dimension
    * instances of the complex filter expressions.
-   *
-   * @param filterDimensions
-   * @return
    */
   private static void addColumnDimensions(Expression expression,
       Set<CarbonDimension> filterDimensions, Set<CarbonMeasure> filterMeasure) {
@@ -981,9 +850,6 @@ public class QueryUtil {
 
   /**
    * Below method will be used to fill the children dimension column id
-   *
-   * @param queryDimensions              query dimension
-   * @param dictionaryDimensionFromQuery dictionary dimension for query
    */
   private static void getChildDimensionOrdinal(CarbonDimension queryDimensions,
       Set<Integer> filterDimensionsOrdinal) {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/expression/BinaryExpression.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/expression/BinaryExpression.java b/core/src/main/java/org/apache/carbondata/scan/expression/BinaryExpression.java
index fbaaa81..e50525d 100644
--- a/core/src/main/java/org/apache/carbondata/scan/expression/BinaryExpression.java
+++ b/core/src/main/java/org/apache/carbondata/scan/expression/BinaryExpression.java
@@ -21,17 +21,9 @@ package org.apache.carbondata.scan.expression;
 
 public abstract class BinaryExpression extends Expression {
 
-  /**
-   *
-   */
   private static final long serialVersionUID = 1L;
-  /**
-   *
-   */
-
   protected Expression left;
   protected Expression right;
-  protected boolean isRangeExpression;
 
   public BinaryExpression(Expression left, Expression right) {
     this.left = left;
@@ -48,12 +40,4 @@ public abstract class BinaryExpression extends Expression {
     return right;
   }
 
-  public boolean isRangeExpression() {
-    return isRangeExpression;
-  }
-
-  public void setRangeExpression(boolean isRangeExpression) {
-    this.isRangeExpression = isRangeExpression;
-  }
-
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/expression/Expression.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/expression/Expression.java b/core/src/main/java/org/apache/carbondata/scan/expression/Expression.java
index a1f2bcf..06f6c72 100644
--- a/core/src/main/java/org/apache/carbondata/scan/expression/Expression.java
+++ b/core/src/main/java/org/apache/carbondata/scan/expression/Expression.java
@@ -46,5 +46,4 @@ public abstract class Expression implements Serializable {
 
   public abstract String getString();
 
-  // public abstract void  accept(ExpressionVisitor visitor);
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/expression/conditional/ConditionalExpression.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/expression/conditional/ConditionalExpression.java b/core/src/main/java/org/apache/carbondata/scan/expression/conditional/ConditionalExpression.java
index a87231f..19653b6 100644
--- a/core/src/main/java/org/apache/carbondata/scan/expression/conditional/ConditionalExpression.java
+++ b/core/src/main/java/org/apache/carbondata/scan/expression/conditional/ConditionalExpression.java
@@ -34,10 +34,4 @@ public interface ConditionalExpression {
 
   List<ExpressionResult> getLiterals();
 
-  /**
-   * will return the flag of direct dictionary column
-   *
-   * @return
-   */
-  boolean isDirectDictionaryColumns();
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/expression/exception/FilterIllegalMemberException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/expression/exception/FilterIllegalMemberException.java b/core/src/main/java/org/apache/carbondata/scan/expression/exception/FilterIllegalMemberException.java
index f75aaed..96b3930 100644
--- a/core/src/main/java/org/apache/carbondata/scan/expression/exception/FilterIllegalMemberException.java
+++ b/core/src/main/java/org/apache/carbondata/scan/expression/exception/FilterIllegalMemberException.java
@@ -41,7 +41,6 @@ public class FilterIllegalMemberException extends Exception {
   /**
    * Constructor
    *
-   * @param errorCode The error code for this exception.
    * @param msg       The error message for this exception.
    */
   public FilterIllegalMemberException(String msg) {
@@ -52,7 +51,6 @@ public class FilterIllegalMemberException extends Exception {
   /**
    * Constructor
    *
-   * @param errorCode The error code for this exception.
    * @param msg       The error message for this exception.
    */
   public FilterIllegalMemberException(String msg, Throwable t) {
@@ -63,8 +61,6 @@ public class FilterIllegalMemberException extends Exception {
   /**
    * Constructor
    *
-   * @param errorCode The error code for this exception.
-   * @param msg       The error message for this exception.
    */
   public FilterIllegalMemberException(Throwable t) {
     super(t);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/expression/exception/FilterUnsupportedException.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/expression/exception/FilterUnsupportedException.java b/core/src/main/java/org/apache/carbondata/scan/expression/exception/FilterUnsupportedException.java
index fd66555..d54ce69 100644
--- a/core/src/main/java/org/apache/carbondata/scan/expression/exception/FilterUnsupportedException.java
+++ b/core/src/main/java/org/apache/carbondata/scan/expression/exception/FilterUnsupportedException.java
@@ -36,7 +36,6 @@ public class FilterUnsupportedException extends Exception {
   /**
    * Constructor
    *
-   * @param errorCode The error code for this exception.
    * @param msg       The error message for this exception.
    */
   public FilterUnsupportedException(String msg) {
@@ -47,7 +46,6 @@ public class FilterUnsupportedException extends Exception {
   /**
    * Constructor
    *
-   * @param errorCode The error code for this exception.
    * @param msg       The error message for this exception.
    */
   public FilterUnsupportedException(String msg, Throwable t) {
@@ -58,8 +56,6 @@ public class FilterUnsupportedException extends Exception {
   /**
    * Constructor
    *
-   * @param errorCode The error code for this exception.
-   * @param msg       The error message for this exception.
    */
   public FilterUnsupportedException(Throwable t) {
     super(t);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/expression/logical/BinaryLogicalExpression.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/expression/logical/BinaryLogicalExpression.java b/core/src/main/java/org/apache/carbondata/scan/expression/logical/BinaryLogicalExpression.java
index 1b4a0fc..d4ad063 100644
--- a/core/src/main/java/org/apache/carbondata/scan/expression/logical/BinaryLogicalExpression.java
+++ b/core/src/main/java/org/apache/carbondata/scan/expression/logical/BinaryLogicalExpression.java
@@ -23,7 +23,6 @@ import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
 
-import org.apache.carbondata.core.carbon.metadata.encoder.Encoding;
 import org.apache.carbondata.core.constants.CarbonCommonConstants;
 import org.apache.carbondata.scan.expression.BinaryExpression;
 import org.apache.carbondata.scan.expression.ColumnExpression;
@@ -107,21 +106,4 @@ public abstract class BinaryLogicalExpression extends BinaryExpression {
 
   }
 
-  /**
-   * the method will return flag (true or false) depending on the existence of the
-   * direct dictionary columns in conditional expression
-   *
-   * @return the method will return flag (true or false)
-   */
-  public boolean isDirectDictionaryColumns() {
-    List<ColumnExpression> listOfExp =
-        new ArrayList<ColumnExpression>(CarbonCommonConstants.DEFAULT_COLLECTION_SIZE);
-    getColumnList(this, listOfExp);
-    for (ColumnExpression ce : listOfExp) {
-      if (!ce.getCarbonColumn().hasEncoding(Encoding.DICTIONARY)) {
-        return true;
-      }
-    }
-    return false;
-  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/filter/FilterExpressionProcessor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/filter/FilterExpressionProcessor.java b/core/src/main/java/org/apache/carbondata/scan/filter/FilterExpressionProcessor.java
index 44a3a31..621b7ec 100644
--- a/core/src/main/java/org/apache/carbondata/scan/filter/FilterExpressionProcessor.java
+++ b/core/src/main/java/org/apache/carbondata/scan/filter/FilterExpressionProcessor.java
@@ -18,6 +18,7 @@
  */
 package org.apache.carbondata.scan.filter;
 
+import java.io.IOException;
 import java.util.ArrayList;
 import java.util.BitSet;
 import java.util.List;
@@ -33,7 +34,6 @@ import org.apache.carbondata.core.carbon.datastore.impl.btree.BTreeDataRefNodeFi
 import org.apache.carbondata.core.carbon.metadata.datatype.DataType;
 import org.apache.carbondata.core.carbon.metadata.encoder.Encoding;
 import org.apache.carbondata.core.keygenerator.KeyGenException;
-import org.apache.carbondata.scan.executor.exception.QueryExecutionException;
 import org.apache.carbondata.scan.expression.BinaryExpression;
 import org.apache.carbondata.scan.expression.Expression;
 import org.apache.carbondata.scan.expression.conditional.BinaryConditionalExpression;
@@ -59,11 +59,9 @@ public class FilterExpressionProcessor implements FilterProcessor {
    * @param expressionTree  , filter expression tree
    * @param tableIdentifier ,contains carbon store informations
    * @return a filter resolver tree
-   * @throws QueryExecutionException
-   * @throws FilterUnsupportedException
    */
   public FilterResolverIntf getFilterResolver(Expression expressionTree,
-      AbsoluteTableIdentifier tableIdentifier) throws FilterUnsupportedException {
+      AbsoluteTableIdentifier tableIdentifier) throws FilterUnsupportedException, IOException {
     if (null != expressionTree && null != tableIdentifier) {
       return getFilterResolvertree(expressionTree, tableIdentifier);
     }
@@ -83,11 +81,10 @@ public class FilterExpressionProcessor implements FilterProcessor {
    * Step:4 The selected blocks will be send to executers for applying the filters with the help
    * of Filter executers.
    *
-   * @throws QueryExecutionException
    */
   public List<DataRefNode> getFilterredBlocks(DataRefNode btreeNode,
       FilterResolverIntf filterResolver, AbstractIndex tableSegment,
-      AbsoluteTableIdentifier tableIdentifier) throws QueryExecutionException {
+      AbsoluteTableIdentifier tableIdentifier) {
     // Need to get the current dimension tables
     List<DataRefNode> listOfDataBlocksToScan = new ArrayList<DataRefNode>();
     // getting the start and end index key based on filter for hitting the
@@ -96,7 +93,7 @@ public class FilterExpressionProcessor implements FilterProcessor {
         + "start and end block as per filter resolver");
     List<IndexKey> listOfStartEndKeys = new ArrayList<IndexKey>(2);
     FilterUtil.traverseResolverTreeAndGetStartAndEndKey(tableSegment.getSegmentProperties(),
-        tableIdentifier, filterResolver, listOfStartEndKeys);
+        filterResolver, listOfStartEndKeys);
     // reading the first value from list which has start key
     IndexKey searchStartKey = listOfStartEndKeys.get(0);
     // reading the last value from list which has end key
@@ -141,7 +138,6 @@ public class FilterExpressionProcessor implements FilterProcessor {
   /**
    * Selects the blocks based on col max and min value.
    *
-   * @param filterResolver
    * @param listOfDataBlocksToScan
    * @param dataRefNode
    */
@@ -163,11 +159,9 @@ public class FilterExpressionProcessor implements FilterProcessor {
    * @param expressionTree , resolver tree which will hold the resolver tree based on
    *                       filter expression.
    * @return FilterResolverIntf type.
-   * @throws QueryExecutionException
-   * @throws FilterUnsupportedException
    */
   private FilterResolverIntf getFilterResolvertree(Expression expressionTree,
-      AbsoluteTableIdentifier tableIdentifier) throws FilterUnsupportedException {
+      AbsoluteTableIdentifier tableIdentifier) throws FilterUnsupportedException, IOException {
     FilterResolverIntf filterEvaluatorTree =
         createFilterResolverTree(expressionTree, tableIdentifier);
     traverseAndResolveTree(filterEvaluatorTree, tableIdentifier);
@@ -182,18 +176,14 @@ public class FilterExpressionProcessor implements FilterProcessor {
    *
    * @param filterResolverTree
    * @param tableIdentifier
-   * @throws FilterUnsupportedException
-   * @throws QueryExecutionException
    */
   private void traverseAndResolveTree(FilterResolverIntf filterResolverTree,
-      AbsoluteTableIdentifier tableIdentifier) throws FilterUnsupportedException {
+      AbsoluteTableIdentifier tableIdentifier) throws FilterUnsupportedException, IOException {
     if (null == filterResolverTree) {
       return;
     }
     traverseAndResolveTree(filterResolverTree.getLeft(), tableIdentifier);
-
     filterResolverTree.resolve(tableIdentifier);
-
     traverseAndResolveTree(filterResolverTree.getRight(), tableIdentifier);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/eaadc88a/core/src/main/java/org/apache/carbondata/scan/filter/FilterProcessor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/carbondata/scan/filter/FilterProcessor.java b/core/src/main/java/org/apache/carbondata/scan/filter/FilterProcessor.java
index 35948e3..f955524 100644
--- a/core/src/main/java/org/apache/carbondata/scan/filter/FilterProcessor.java
+++ b/core/src/main/java/org/apache/carbondata/scan/filter/FilterProcessor.java
@@ -19,12 +19,12 @@ package org.apache.carbondata.scan.filter;
  * under the License.
  */
 
+import java.io.IOException;
 import java.util.List;
 
 import org.apache.carbondata.core.carbon.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.carbon.datastore.DataRefNode;
 import org.apache.carbondata.core.carbon.datastore.block.AbstractIndex;
-import org.apache.carbondata.scan.executor.exception.QueryExecutionException;
 import org.apache.carbondata.scan.expression.Expression;
 import org.apache.carbondata.scan.expression.exception.FilterUnsupportedException;
 import org.apache.carbondata.scan.filter.resolver.FilterResolverIntf;
@@ -38,11 +38,10 @@ public interface FilterProcessor {
    * @param expressionTree  , filter expression tree
    * @param tableIdentifier ,contains carbon store informations.
    * @return
-   * @throws QueryExecutionException
    * @throws FilterUnsupportedException
    */
   FilterResolverIntf getFilterResolver(Expression expressionTree,
-      AbsoluteTableIdentifier tableIdentifier) throws FilterUnsupportedException;
+      AbsoluteTableIdentifier tableIdentifier) throws FilterUnsupportedException, IOException;
 
   /**
    * This API is exposed inorder to get the required block reference node
@@ -51,10 +50,8 @@ public interface FilterProcessor {
    *
    * @param filterResolver DataBlock list with resolved filters
    * @return list of DataRefNode.
-   * @throws QueryExecutionException
    */
   List<DataRefNode> getFilterredBlocks(DataRefNode dataRefNode, FilterResolverIntf filterResolver,
-      AbstractIndex segmentIndexBuilder, AbsoluteTableIdentifier tableIdentifier)
-      throws QueryExecutionException;
+      AbstractIndex segmentIndexBuilder, AbsoluteTableIdentifier tableIdentifier);
 
 }


Mime
View raw message