You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@carbondata.apache.org by ch...@apache.org on 2016/06/30 17:41:52 UTC

[05/50] [abbrv] incubator-carbondata git commit: [Issue- CARBONDATA-7] fortify issue fixes, Fixed Explicit null dereferenced , Dereference null return value (#738)

[Issue- CARBONDATA-7] fortify issue fixes, Fixed Explicit null dereferenced ,Dereference null return value (#738)



Project: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/commit/a174f69e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/tree/a174f69e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-carbondata/diff/a174f69e

Branch: refs/heads/master
Commit: a174f69e711f531e33d5979aa8845b1aee9de902
Parents: f17319d
Author: Mohammad Shahid Khan <mo...@gmail.com>
Authored: Sat Jun 25 12:52:50 2016 +0530
Committer: Ravindra Pesala <ra...@gmail.com>
Committed: Sat Jun 25 12:52:50 2016 +0530

----------------------------------------------------------------------
 .../cache/dictionary/ColumnDictionaryInfo.java  |  5 +-
 .../datastore/block/SegmentProperties.java      |  6 +-
 .../store/filesystem/HDFSCarbonFile.java        |  3 +-
 .../store/filesystem/ViewFSCarbonFile.java      |  6 +-
 .../org/carbondata/core/util/CarbonUtil.java    |  3 +-
 .../core/writer/HierarchyValueWriterForCSV.java |  2 +-
 .../aggregator/impl/CustomAggregatorHelper.java |  6 +-
 .../query/carbon/executor/util/QueryUtil.java   | 13 +++-
 .../query/expression/ColumnExpression.java      |  3 +-
 .../executer/ColGroupFilterExecuterImpl.java    | 26 ++++---
 .../executer/RowLevelFilterExecuterImpl.java    | 26 ++++---
 .../filters/measurefilter/util/FilterUtil.java  | 77 +++++++++++---------
 .../query/util/DataFileFooterConverter.java     | 19 ++---
 13 files changed, 112 insertions(+), 83 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/core/cache/dictionary/ColumnDictionaryInfo.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/cache/dictionary/ColumnDictionaryInfo.java b/core/src/main/java/org/carbondata/core/cache/dictionary/ColumnDictionaryInfo.java
index c9dff58..9f40406 100644
--- a/core/src/main/java/org/carbondata/core/cache/dictionary/ColumnDictionaryInfo.java
+++ b/core/src/main/java/org/carbondata/core/cache/dictionary/ColumnDictionaryInfo.java
@@ -193,7 +193,10 @@ public class ColumnDictionaryInfo extends AbstractColumnDictionaryInfo {
         int surrogateKey = sortedSurrogates.get(mid);
         byte[] dictionaryValue = getDictionaryBytesFromSurrogate(surrogateKey);
         int cmp = -1;
-        if (this.getDataType() != DataType.STRING) {
+        //fortify fix
+        if (null == dictionaryValue) {
+          cmp = -1;
+        } else if (this.getDataType() != DataType.STRING) {
           cmp = compareFilterKeyWithDictionaryKey(new String(dictionaryValue), filterKey,
               this.getDataType());
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/core/carbon/datastore/block/SegmentProperties.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/carbon/datastore/block/SegmentProperties.java b/core/src/main/java/org/carbondata/core/carbon/datastore/block/SegmentProperties.java
index c177feb..137468d 100644
--- a/core/src/main/java/org/carbondata/core/carbon/datastore/block/SegmentProperties.java
+++ b/core/src/main/java/org/carbondata/core/carbon/datastore/block/SegmentProperties.java
@@ -235,7 +235,8 @@ public class SegmentProperties {
   /**
    * below method will fill dimension and measure detail of the block.
    *
-   * @param blockMetadata
+   * @param columnsInTable
+   * @param columnCardinality
    */
   private void fillDimensionAndMeasureDetails(List<ColumnSchema> columnsInTable,
       int[] columnCardinality) {
@@ -435,7 +436,8 @@ public class SegmentProperties {
       // then we need to add ordinal of that column as it belongs to same
       // column group
       if (!dimensions.get(index).isColumnar()
-          && dimensions.get(index).columnGroupId() == prvColumnGroupId) {
+          && dimensions.get(index).columnGroupId() == prvColumnGroupId
+          && null != currentColumnGroup) {
         currentColumnGroup.add(index);
       }
       // if column is not a columnar then new column group has come

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/core/datastorage/store/filesystem/HDFSCarbonFile.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/datastorage/store/filesystem/HDFSCarbonFile.java b/core/src/main/java/org/carbondata/core/datastorage/store/filesystem/HDFSCarbonFile.java
index 98e40b4..2df5a82 100644
--- a/core/src/main/java/org/carbondata/core/datastorage/store/filesystem/HDFSCarbonFile.java
+++ b/core/src/main/java/org/carbondata/core/datastorage/store/filesystem/HDFSCarbonFile.java
@@ -104,7 +104,8 @@ public class HDFSCarbonFile extends AbstractDFSCarbonFile {
 
   @Override
   public CarbonFile getParentFile() {
-    return new HDFSCarbonFile(fileStatus.getPath().getParent());
+    Path parent = fileStatus.getPath().getParent();
+    return null == parent ? null : new HDFSCarbonFile(parent);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/core/datastorage/store/filesystem/ViewFSCarbonFile.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/datastorage/store/filesystem/ViewFSCarbonFile.java b/core/src/main/java/org/carbondata/core/datastorage/store/filesystem/ViewFSCarbonFile.java
index c7e4497..43c2ef9 100644
--- a/core/src/main/java/org/carbondata/core/datastorage/store/filesystem/ViewFSCarbonFile.java
+++ b/core/src/main/java/org/carbondata/core/datastorage/store/filesystem/ViewFSCarbonFile.java
@@ -101,9 +101,9 @@ public class ViewFSCarbonFile extends AbstractDFSCarbonFile {
     return files;
   }
 
-  @Override
-  public CarbonFile getParentFile() {
-    return new ViewFSCarbonFile(fileStatus.getPath().getParent());
+  @Override public CarbonFile getParentFile() {
+    Path parent = fileStatus.getPath().getParent();
+    return null == parent ? null : new ViewFSCarbonFile(parent);
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/core/util/CarbonUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/util/CarbonUtil.java b/core/src/main/java/org/carbondata/core/util/CarbonUtil.java
index 2910105..58e6f42 100644
--- a/core/src/main/java/org/carbondata/core/util/CarbonUtil.java
+++ b/core/src/main/java/org/carbondata/core/util/CarbonUtil.java
@@ -1219,7 +1219,8 @@ public final class CarbonUtil {
           .getProperty(CarbonCommonConstants.CARBON_DDL_BASE_HDFS_URL);
       if (null != baseDFSUrl) {
         String dfsUrl = conf.get(FS_DEFAULT_FS);
-        if (dfsUrl.startsWith(HDFS_PREFIX) || dfsUrl.startsWith(VIEWFS_PREFIX)) {
+        if (null != dfsUrl && (dfsUrl.startsWith(HDFS_PREFIX) || dfsUrl
+            .startsWith(VIEWFS_PREFIX))) {
           baseDFSUrl = dfsUrl + baseDFSUrl;
         }
         if (baseDFSUrl.endsWith("/")) {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/core/writer/HierarchyValueWriterForCSV.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/core/writer/HierarchyValueWriterForCSV.java b/core/src/main/java/org/carbondata/core/writer/HierarchyValueWriterForCSV.java
index 43dd102..d75ac6f 100644
--- a/core/src/main/java/org/carbondata/core/writer/HierarchyValueWriterForCSV.java
+++ b/core/src/main/java/org/carbondata/core/writer/HierarchyValueWriterForCSV.java
@@ -127,7 +127,7 @@ public class HierarchyValueWriterForCSV {
       }
     });
 
-    if (listFiles.length == 0) {
+    if (null == listFiles || listFiles.length == 0) {
       counter = 0;
       return;
     }

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/query/aggregator/impl/CustomAggregatorHelper.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/query/aggregator/impl/CustomAggregatorHelper.java b/core/src/main/java/org/carbondata/query/aggregator/impl/CustomAggregatorHelper.java
index 0e23df1..4370dc7 100644
--- a/core/src/main/java/org/carbondata/query/aggregator/impl/CustomAggregatorHelper.java
+++ b/core/src/main/java/org/carbondata/query/aggregator/impl/CustomAggregatorHelper.java
@@ -120,8 +120,10 @@ public class CustomAggregatorHelper {
       File[] filesArray = null;
       for (File loadFoler : loadFolderList) {
         filesArray = getFilesArray(loadFoler, tableName + '_' + columnName);
-        for (int i = 0; i < filesArray.length; i++) {
-          readLevelFileAndUpdateCache(filesArray[i], tableName + '_' + columnName);
+        if (null != filesArray) {
+          for (int i = 0; i < filesArray.length; i++) {
+            readLevelFileAndUpdateCache(filesArray[i], tableName + '_' + columnName);
+          }
         }
       }
     } catch (IOException e) {

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java b/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java
index 789f77e..a8eaa49 100644
--- a/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java
+++ b/core/src/main/java/org/carbondata/query/carbon/executor/util/QueryUtil.java
@@ -161,7 +161,6 @@ public class QueryUtil {
    *
    * @param queryDimensions dimension selected in query
    * @param generator       key generator
-   * @param allDimension    all dimension present in the table
    * @return max key for dimension
    * @throws KeyGenException if any problem while generating the key
    */
@@ -263,7 +262,7 @@ public class QueryUtil {
    * @param dimAggInfo                 dimension present in the dimension aggregation
    *                                   dictionary will be used to convert to actual data
    *                                   for aggregation
-   * @param customAggregationDimension dimension which is present in the expression for aggregation
+   * @param customAggExpression        dimension which is present in the expression for aggregation
    *                                   we need dictionary data
    * @param absoluteTableIdentifier    absolute table identifier
    * @return dimension unique id to its dictionary map
@@ -352,7 +351,8 @@ public class QueryUtil {
    * @return
    */
   private static List<DictionaryColumnUniqueIdentifier> getDictionaryColumnUniqueIdentifierList(
-      List<String> dictionaryColumnIdList, CarbonTableIdentifier carbonTableIdentifier) {
+      List<String> dictionaryColumnIdList, CarbonTableIdentifier carbonTableIdentifier)
+      throws QueryExecutionException {
     CarbonTable carbonTable =
         CarbonMetadata.getInstance().getCarbonTable(carbonTableIdentifier.getTableUniqueName());
     List<DictionaryColumnUniqueIdentifier> dictionaryColumnUniqueIdentifiers =
@@ -360,6 +360,10 @@ public class QueryUtil {
     for (String columnIdentifier : dictionaryColumnIdList) {
       CarbonDimension dimension = CarbonMetadata.getInstance()
           .getCarbonDimensionBasedOnColIdentifier(carbonTable, columnIdentifier);
+      if (null == dimension) {
+        throw new QueryExecutionException(
+            "The column id " + columnIdentifier + " could not be resolved.");
+      }
       DictionaryColumnUniqueIdentifier dictionaryColumnUniqueIdentifier =
           new DictionaryColumnUniqueIdentifier(carbonTableIdentifier, columnIdentifier,
               dimension.getDataType());
@@ -628,7 +632,8 @@ public class QueryUtil {
       // then we need to add ordinal of that column as it belongs to same
       // column group
       if (!dimensions.get(index).getDimension().isColumnar()
-          && dimensions.get(index).getDimension().columnGroupId() == prvColumnGroupId) {
+          && dimensions.get(index).getDimension().columnGroupId() == prvColumnGroupId
+          && null != currentColumnGroup) {
         currentColumnGroup.add(dimensions.get(index).getDimension().getOrdinal());
       }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/query/expression/ColumnExpression.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/query/expression/ColumnExpression.java b/core/src/main/java/org/carbondata/query/expression/ColumnExpression.java
index aa0de43..8511621 100644
--- a/core/src/main/java/org/carbondata/query/expression/ColumnExpression.java
+++ b/core/src/main/java/org/carbondata/query/expression/ColumnExpression.java
@@ -89,7 +89,8 @@ public class ColumnExpression extends LeafExpression {
   }
 
   @Override public ExpressionResult evaluate(RowIntf value) {
-    ExpressionResult expressionResult = new ExpressionResult(dataType, value.getVal(colIndex));
+    ExpressionResult expressionResult =
+        new ExpressionResult(dataType, (null == value ? null : value.getVal(colIndex)));
     return expressionResult;
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/query/filter/executer/ColGroupFilterExecuterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/query/filter/executer/ColGroupFilterExecuterImpl.java b/core/src/main/java/org/carbondata/query/filter/executer/ColGroupFilterExecuterImpl.java
index 21847d0..e4e3812 100644
--- a/core/src/main/java/org/carbondata/query/filter/executer/ColGroupFilterExecuterImpl.java
+++ b/core/src/main/java/org/carbondata/query/filter/executer/ColGroupFilterExecuterImpl.java
@@ -145,7 +145,7 @@ public class ColGroupFilterExecuterImpl extends IncludeFilterExecuterImpl {
   /**
    * It extract min and max data for given column from stored min max value
    *
-   * @param cols
+   * @param colGrpColumns
    * @param minMaxData
    * @param columnIndex
    * @return
@@ -153,18 +153,20 @@ public class ColGroupFilterExecuterImpl extends IncludeFilterExecuterImpl {
   private byte[] getMinMaxData(int[] colGrpColumns, byte[] minMaxData, int columnIndex) {
     int startIndex = 0;
     int endIndex = 0;
-    for (int i = 0; i < colGrpColumns.length; i++) {
-      int[] byteRange =
-          segmentProperties.getDimensionKeyGenerator().getKeyByteOffsets(colGrpColumns[i]);
-      int colSize = 0;
-      for (int j = byteRange[0]; j <= byteRange[1]; j++) {
-        colSize++;
-      }
-      if (colGrpColumns[i] == columnIndex) {
-        endIndex = startIndex + colSize;
-        break;
+    if (null != colGrpColumns) {
+      for (int i = 0; i < colGrpColumns.length; i++) {
+        int[] byteRange =
+            segmentProperties.getDimensionKeyGenerator().getKeyByteOffsets(colGrpColumns[i]);
+        int colSize = 0;
+        for (int j = byteRange[0]; j <= byteRange[1]; j++) {
+          colSize++;
+        }
+        if (colGrpColumns[i] == columnIndex) {
+          endIndex = startIndex + colSize;
+          break;
+        }
+        startIndex += colSize;
       }
-      startIndex += colSize;
     }
     byte[] data = new byte[endIndex - startIndex];
     System.arraycopy(minMaxData, startIndex, data, 0, data.length);

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/query/filter/executer/RowLevelFilterExecuterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/query/filter/executer/RowLevelFilterExecuterImpl.java b/core/src/main/java/org/carbondata/query/filter/executer/RowLevelFilterExecuterImpl.java
index 31794a4..095f757 100644
--- a/core/src/main/java/org/carbondata/query/filter/executer/RowLevelFilterExecuterImpl.java
+++ b/core/src/main/java/org/carbondata/query/filter/executer/RowLevelFilterExecuterImpl.java
@@ -215,18 +215,20 @@ public class RowLevelFilterExecuterImpl implements FilterExecuter {
           MeasureAggregator aggregator = MeasureAggregatorFactory
               .getAggregator(msrColumnEvalutorInfo.getAggregator(),
                   msrColumnEvalutorInfo.getType());
-          aggregator.merge(
-              blockChunkHolder.getMeasureDataChunk()[msrColumnEvalutorInfo.getColumnIndex()]
-                  .getMeasureDataHolder().getReadableByteArrayValueByIndex(index));
-          switch (msrType) {
-            case LONG:
-              record[msrColumnEvalutorInfo.getRowIndex()] = aggregator.getLongValue();
-              break;
-            case DECIMAL:
-              record[msrColumnEvalutorInfo.getRowIndex()] = aggregator.getBigDecimalValue();
-              break;
-            default:
-              record[msrColumnEvalutorInfo.getRowIndex()] = aggregator.getDoubleValue();
+          if (null != aggregator) {
+            aggregator.merge(
+                blockChunkHolder.getMeasureDataChunk()[msrColumnEvalutorInfo.getColumnIndex()]
+                    .getMeasureDataHolder().getReadableByteArrayValueByIndex(index));
+            switch (msrType) {
+              case LONG:
+                record[msrColumnEvalutorInfo.getRowIndex()] = aggregator.getLongValue();
+                break;
+              case DECIMAL:
+                record[msrColumnEvalutorInfo.getRowIndex()] = aggregator.getBigDecimalValue();
+                break;
+              default:
+                record[msrColumnEvalutorInfo.getRowIndex()] = aggregator.getDoubleValue();
+            }
           }
         } else {
           Object msrValue;

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/query/filters/measurefilter/util/FilterUtil.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/query/filters/measurefilter/util/FilterUtil.java b/core/src/main/java/org/carbondata/query/filters/measurefilter/util/FilterUtil.java
index 3903aee..74cb4cd 100644
--- a/core/src/main/java/org/carbondata/query/filters/measurefilter/util/FilterUtil.java
+++ b/core/src/main/java/org/carbondata/query/filters/measurefilter/util/FilterUtil.java
@@ -107,42 +107,50 @@ public final class FilterUtil {
   private static FilterExecuter createFilterExecuterTree(
       FilterResolverIntf filterExpressionResolverTree, SegmentProperties segmentProperties) {
     FilterExecuterType filterExecuterType = filterExpressionResolverTree.getFilterExecuterType();
-    switch (filterExecuterType) {
-      case INCLUDE:
-        return getIncludeFilterExecuter(filterExpressionResolverTree.getDimColResolvedFilterInfo(),
-            segmentProperties);
-      case EXCLUDE:
-        return new ExcludeFilterExecuterImpl(
-            filterExpressionResolverTree.getDimColResolvedFilterInfo(),
-            segmentProperties.getDimensionKeyGenerator());
-      case OR:
-        return new OrFilterExecuterImpl(
-            createFilterExecuterTree(filterExpressionResolverTree.getLeft(), segmentProperties),
-            createFilterExecuterTree(filterExpressionResolverTree.getRight(), segmentProperties));
-      case AND:
-        return new AndFilterExecuterImpl(
-            createFilterExecuterTree(filterExpressionResolverTree.getLeft(), segmentProperties),
-            createFilterExecuterTree(filterExpressionResolverTree.getRight(), segmentProperties));
-      case RESTRUCTURE:
-        return new RestructureFilterExecuterImpl(
-            filterExpressionResolverTree.getDimColResolvedFilterInfo(),
-            segmentProperties.getDimensionKeyGenerator());
-      case ROWLEVEL_LESSTHAN:
-      case ROWLEVEL_LESSTHAN_EQUALTO:
-      case ROWLEVEL_GREATERTHAN_EQUALTO:
-      case ROWLEVEL_GREATERTHAN:
-        return RowLevelRangeTypeExecuterFacory
-            .getRowLevelRangeTypeExecuter(filterExecuterType, filterExpressionResolverTree);
-      case ROWLEVEL:
-      default:
-        return new RowLevelFilterExecuterImpl(
-            ((RowLevelFilterResolverImpl) filterExpressionResolverTree)
-                .getDimColEvaluatorInfoList(),
-            ((RowLevelFilterResolverImpl) filterExpressionResolverTree).getMsrColEvalutorInfoList(),
-            ((RowLevelFilterResolverImpl) filterExpressionResolverTree).getFilterExpresion(),
-            ((RowLevelFilterResolverImpl) filterExpressionResolverTree).getTableIdentifier());
+    if (null != filterExecuterType) {
+      switch (filterExecuterType) {
+        case INCLUDE:
+          return getIncludeFilterExecuter(
+              filterExpressionResolverTree.getDimColResolvedFilterInfo(), segmentProperties);
+        case EXCLUDE:
+          return new ExcludeFilterExecuterImpl(
+              filterExpressionResolverTree.getDimColResolvedFilterInfo(),
+              segmentProperties.getDimensionKeyGenerator());
+        case OR:
+          return new OrFilterExecuterImpl(
+              createFilterExecuterTree(filterExpressionResolverTree.getLeft(), segmentProperties),
+              createFilterExecuterTree(filterExpressionResolverTree.getRight(), segmentProperties));
+        case AND:
+          return new AndFilterExecuterImpl(
+              createFilterExecuterTree(filterExpressionResolverTree.getLeft(), segmentProperties),
+              createFilterExecuterTree(filterExpressionResolverTree.getRight(), segmentProperties));
+        case RESTRUCTURE:
+          return new RestructureFilterExecuterImpl(
+              filterExpressionResolverTree.getDimColResolvedFilterInfo(),
+              segmentProperties.getDimensionKeyGenerator());
+        case ROWLEVEL_LESSTHAN:
+        case ROWLEVEL_LESSTHAN_EQUALTO:
+        case ROWLEVEL_GREATERTHAN_EQUALTO:
+        case ROWLEVEL_GREATERTHAN:
+          return RowLevelRangeTypeExecuterFacory
+              .getRowLevelRangeTypeExecuter(filterExecuterType, filterExpressionResolverTree);
+        case ROWLEVEL:
+        default:
+          return new RowLevelFilterExecuterImpl(
+              ((RowLevelFilterResolverImpl) filterExpressionResolverTree)
+                  .getDimColEvaluatorInfoList(),
+              ((RowLevelFilterResolverImpl) filterExpressionResolverTree)
+                  .getMsrColEvalutorInfoList(),
+              ((RowLevelFilterResolverImpl) filterExpressionResolverTree).getFilterExpresion(),
+              ((RowLevelFilterResolverImpl) filterExpressionResolverTree).getTableIdentifier());
 
+      }
     }
+    return new RowLevelFilterExecuterImpl(
+        ((RowLevelFilterResolverImpl) filterExpressionResolverTree).getDimColEvaluatorInfoList(),
+        ((RowLevelFilterResolverImpl) filterExpressionResolverTree).getMsrColEvalutorInfoList(),
+        ((RowLevelFilterResolverImpl) filterExpressionResolverTree).getFilterExpresion(),
+        ((RowLevelFilterResolverImpl) filterExpressionResolverTree).getTableIdentifier());
 
   }
 
@@ -1218,6 +1226,7 @@ public final class FilterUtil {
   /**
    * Method will find whether the expression needs to be resolved, this can happen
    * if the expression is exclude and data type is null(mainly in IS NOT NULL filter scenario)
+   *
    * @param rightExp
    * @param isIncludeFilter
    * @return

http://git-wip-us.apache.org/repos/asf/incubator-carbondata/blob/a174f69e/core/src/main/java/org/carbondata/query/util/DataFileFooterConverter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/carbondata/query/util/DataFileFooterConverter.java b/core/src/main/java/org/carbondata/query/util/DataFileFooterConverter.java
index d79ea5d..7ca9a3f 100644
--- a/core/src/main/java/org/carbondata/query/util/DataFileFooterConverter.java
+++ b/core/src/main/java/org/carbondata/query/util/DataFileFooterConverter.java
@@ -183,15 +183,16 @@ public class DataFileFooterConverter {
     List<DataChunk> measureChunk = new ArrayList<DataChunk>();
     Iterator<org.carbondata.format.DataChunk> column_data_chunksIterator =
         blockletInfoThrift.getColumn_data_chunksIterator();
-    while (column_data_chunksIterator.hasNext()) {
-      org.carbondata.format.DataChunk next = column_data_chunksIterator.next();
-      if (next.isRowMajor()) {
-        dimensionColumnChunk.add(getDataChunk(next, false));
-      } else if (next.getEncoders().contains(org.carbondata.format.Encoding.DELTA)) {
-        measureChunk.add(getDataChunk(next, true));
-      } else {
-
-        dimensionColumnChunk.add(getDataChunk(next, false));
+    if (null != column_data_chunksIterator) {
+      while (column_data_chunksIterator.hasNext()) {
+        org.carbondata.format.DataChunk next = column_data_chunksIterator.next();
+        if (next.isRowMajor()) {
+          dimensionColumnChunk.add(getDataChunk(next, false));
+        } else if (next.getEncoders().contains(org.carbondata.format.Encoding.DELTA)) {
+          measureChunk.add(getDataChunk(next, true));
+        } else {
+          dimensionColumnChunk.add(getDataChunk(next, false));
+        }
       }
     }
     blockletInfo.setDimensionColumnChunk(dimensionColumnChunk);