[CARBONDATA-2458] Remove unnecessary TableProvider interface

Remove unused / unnecessary TableProvider Interface

This closes #2280


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

Branch: refs/heads/spark-2.3
Commit: 2c0fa107974145734ad8589d79ef273f98ed249d
Parents: d5da9a1
Author: dhatchayani <dhatcha.offic...@gmail.com>
Authored: Tue May 8 12:40:59 2018 +0530
Committer: Jacky Li <jacky.li...@qq.com>
Committed: Wed May 9 10:20:03 2018 +0800

----------------------------------------------------------------------
 .../core/metadata/schema/table/CarbonTable.java |  6 +--
 .../executor/impl/AbstractQueryExecutor.java    |  6 +--
 .../core/scan/executor/util/QueryUtil.java      | 20 +++------
 .../scan/filter/FilterExpressionProcessor.java  | 16 +++----
 .../core/scan/filter/FilterProcessor.java       |  2 +-
 .../carbondata/core/scan/filter/FilterUtil.java | 44 +++++++-------------
 .../core/scan/filter/SingleTableProvider.java   | 41 ------------------
 .../core/scan/filter/TableProvider.java         | 29 -------------
 .../resolver/ConditionalFilterResolverImpl.java |  9 +---
 .../filter/resolver/FilterResolverIntf.java     |  3 +-
 .../resolver/LogicalFilterResolverImpl.java     |  5 +--
 .../resolver/RowLevelFilterResolverImpl.java    |  4 +-
 .../RowLevelRangeFilterResolverImpl.java        |  3 +-
 .../metadata/FilterResolverMetadata.java        | 10 -----
 .../FalseConditionalResolverImpl.java           |  4 +-
 .../TrueConditionalResolverImpl.java            |  4 +-
 .../visitor/DictionaryColumnVisitor.java        |  2 +-
 .../visitor/RangeDictionaryColumnVisitor.java   |  3 +-
 .../core/scan/model/QueryModelBuilder.java      |  4 +-
 .../hadoop/api/CarbonFileInputFormat.java       |  5 +--
 .../hadoop/api/CarbonTableInputFormat.java      |  8 +---
 21 files changed, 46 insertions(+), 182 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java
 
b/core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java
index cf5660f..5acca27 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/metadata/schema/table/CarbonTable.java
@@ -49,7 +49,6 @@ import 
org.apache.carbondata.core.metadata.schema.table.column.CarbonMeasure;
 import org.apache.carbondata.core.metadata.schema.table.column.ColumnSchema;
 import org.apache.carbondata.core.scan.expression.Expression;
 import org.apache.carbondata.core.scan.filter.FilterExpressionProcessor;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 import org.apache.carbondata.core.scan.filter.intf.FilterOptimizer;
 import org.apache.carbondata.core.scan.filter.optimizer.RangeFilterOptmizer;
 import org.apache.carbondata.core.scan.filter.resolver.FilterResolverIntf;
@@ -916,12 +915,11 @@ public class CarbonTable implements Serializable {
   /**
    * Resolve the filter expression.
    */
-  public FilterResolverIntf resolveFilter(Expression filterExpression,
-      TableProvider tableProvider) {
+  public FilterResolverIntf resolveFilter(Expression filterExpression) {
     try {
       FilterExpressionProcessor filterExpressionProcessor = new 
FilterExpressionProcessor();
       return filterExpressionProcessor.getFilterResolver(
-          filterExpression, getAbsoluteTableIdentifier(), tableProvider);
+          filterExpression, getAbsoluteTableIdentifier());
     } catch (Exception e) {
       throw new RuntimeException("Error while resolving filter expression", e);
     }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java
index ed0350f..ff0e5ce 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/executor/impl/AbstractQueryExecutor.java
@@ -58,8 +58,6 @@ import 
org.apache.carbondata.core.scan.executor.infos.BlockExecutionInfo;
 import org.apache.carbondata.core.scan.executor.util.QueryUtil;
 import org.apache.carbondata.core.scan.executor.util.RestructureUtil;
 import org.apache.carbondata.core.scan.filter.FilterUtil;
-import org.apache.carbondata.core.scan.filter.SingleTableProvider;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 import org.apache.carbondata.core.scan.model.ProjectionDimension;
 import org.apache.carbondata.core.scan.model.ProjectionMeasure;
 import org.apache.carbondata.core.scan.model.QueryModel;
@@ -178,7 +176,6 @@ public abstract class AbstractQueryExecutor<E> implements 
QueryExecutor<E> {
         queryProperties.complexFilterDimension, 
queryProperties.filterMeasures);
 
     CarbonTable carbonTable = queryModel.getTable();
-    TableProvider tableProvider = new SingleTableProvider(carbonTable);
 
     queryStatistic = new QueryStatistic();
     // dictionary column unique column id to dictionary mapping
@@ -187,8 +184,7 @@ public abstract class AbstractQueryExecutor<E> implements 
QueryExecutor<E> {
         QueryUtil.getDimensionDictionaryDetail(
             queryModel.getProjectionDimensions(),
             queryProperties.complexFilterDimension,
-            queryModel.getAbsoluteTableIdentifier(),
-            tableProvider);
+            carbonTable);
     queryStatistic
         .addStatistics(QueryStatisticsConstants.LOAD_DICTIONARY, 
System.currentTimeMillis());
     queryProperties.queryStatisticsRecorder.recordStatistics(queryStatistic);

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/executor/util/QueryUtil.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/executor/util/QueryUtil.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/executor/util/QueryUtil.java
index cc31efc..bb33b24 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/executor/util/QueryUtil.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/executor/util/QueryUtil.java
@@ -41,7 +41,6 @@ import 
org.apache.carbondata.core.keygenerator.KeyGenException;
 import org.apache.carbondata.core.keygenerator.KeyGenerator;
 import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.metadata.CarbonMetadata;
-import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
 import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.metadata.datatype.DataType;
 import org.apache.carbondata.core.metadata.datatype.DataTypes;
@@ -57,7 +56,6 @@ import 
org.apache.carbondata.core.scan.executor.infos.KeyStructureInfo;
 import org.apache.carbondata.core.scan.expression.ColumnExpression;
 import org.apache.carbondata.core.scan.expression.Expression;
 import org.apache.carbondata.core.scan.filter.GenericQueryType;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 import org.apache.carbondata.core.scan.filter.resolver.FilterResolverIntf;
 import 
org.apache.carbondata.core.scan.filter.resolver.resolverinfo.DimColumnResolvedFilterInfo;
 import org.apache.carbondata.core.scan.model.ProjectionDimension;
@@ -271,14 +269,12 @@ public class QueryUtil {
    *
    * @param queryDimensions         query dimension present in the query this 
will be used to
    *                                convert the result from surrogate key to 
actual data
-   * @param absoluteTableIdentifier absolute table identifier
    * @return dimension unique id to its dictionary map
    * @throws IOException
    */
   public static Map<String, Dictionary> getDimensionDictionaryDetail(
       List<ProjectionDimension> queryDimensions, Set<CarbonDimension> 
filterComplexDimensions,
-      AbsoluteTableIdentifier absoluteTableIdentifier, TableProvider 
tableProvider)
-      throws IOException {
+      CarbonTable carbonTable) throws IOException {
     // to store complex dimension and its child id unique column id list, this 
is required as
     // dimension can be present in  projection and filter
     // so we need to get only one instance of dictionary
@@ -309,7 +305,7 @@ public class QueryUtil {
     List<String> dictionaryColumnIdList =
         new ArrayList<String>(dictionaryDimensionFromQuery.size());
     dictionaryColumnIdList.addAll(dictionaryDimensionFromQuery);
-    return getDictionaryMap(dictionaryColumnIdList, absoluteTableIdentifier, 
tableProvider);
+    return getDictionaryMap(dictionaryColumnIdList, carbonTable);
   }
 
   /**
@@ -336,21 +332,18 @@ public class QueryUtil {
    * Below method will be used to get the column id to its dictionary mapping
    *
    * @param dictionaryColumnIdList  dictionary column list
-   * @param absoluteTableIdentifier absolute table identifier
    * @return dictionary mapping
    * @throws IOException
    */
   private static Map<String, Dictionary> getDictionaryMap(List<String> 
dictionaryColumnIdList,
-      AbsoluteTableIdentifier absoluteTableIdentifier, TableProvider 
tableProvider)
-      throws IOException {
+      CarbonTable carbonTable) throws IOException {
     // if any complex dimension not present in query then return the empty map
     if (dictionaryColumnIdList.size() == 0) {
       return new HashMap<>();
     }
     // this for dictionary unique identifier
     List<DictionaryColumnUniqueIdentifier> dictionaryColumnUniqueIdentifiers =
-        getDictionaryColumnUniqueIdentifierList(dictionaryColumnIdList,
-            absoluteTableIdentifier.getCarbonTableIdentifier(), tableProvider);
+        getDictionaryColumnUniqueIdentifierList(dictionaryColumnIdList, 
carbonTable);
     CacheProvider cacheProvider = CacheProvider.getInstance();
     Cache<DictionaryColumnUniqueIdentifier, Dictionary> forwardDictionaryCache 
= cacheProvider
         .createCache(CacheType.FORWARD_DICTIONARY);
@@ -371,13 +364,10 @@ public class QueryUtil {
    * Below method will be used to get the dictionary column unique identifier
    *
    * @param dictionaryColumnIdList dictionary
-   * @param carbonTableIdentifier
    * @return
    */
   private static List<DictionaryColumnUniqueIdentifier> 
getDictionaryColumnUniqueIdentifierList(
-      List<String> dictionaryColumnIdList, CarbonTableIdentifier 
carbonTableIdentifier,
-      TableProvider tableProvider) throws IOException {
-    CarbonTable carbonTable = 
tableProvider.getCarbonTable(carbonTableIdentifier);
+      List<String> dictionaryColumnIdList, CarbonTable carbonTable) throws 
IOException {
     List<DictionaryColumnUniqueIdentifier> dictionaryColumnUniqueIdentifiers =
         new ArrayList<>(dictionaryColumnIdList.size());
     for (String columnId : dictionaryColumnIdList) {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java
index 6adfb3a..dc9415e 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterExpressionProcessor.java
@@ -78,10 +78,10 @@ public class FilterExpressionProcessor implements 
FilterProcessor {
    * @return a filter resolver tree
    */
   public FilterResolverIntf getFilterResolver(Expression expressionTree,
-      AbsoluteTableIdentifier tableIdentifier, TableProvider tableProvider)
+      AbsoluteTableIdentifier tableIdentifier)
       throws FilterUnsupportedException, IOException {
     if (null != expressionTree && null != tableIdentifier) {
-      return getFilterResolvertree(expressionTree, tableIdentifier, 
tableProvider);
+      return getFilterResolvertree(expressionTree, tableIdentifier);
     }
     return null;
   }
@@ -225,11 +225,11 @@ public class FilterExpressionProcessor implements 
FilterProcessor {
    * @return FilterResolverIntf type.
    */
   private FilterResolverIntf getFilterResolvertree(Expression expressionTree,
-      AbsoluteTableIdentifier tableIdentifier, TableProvider tableProvider)
+      AbsoluteTableIdentifier tableIdentifier)
       throws FilterUnsupportedException, IOException {
     FilterResolverIntf filterEvaluatorTree =
         createFilterResolverTree(expressionTree, tableIdentifier);
-    traverseAndResolveTree(filterEvaluatorTree, tableIdentifier, 
tableProvider);
+    traverseAndResolveTree(filterEvaluatorTree, tableIdentifier);
     return filterEvaluatorTree;
   }
 
@@ -243,14 +243,14 @@ public class FilterExpressionProcessor implements 
FilterProcessor {
    * @param tableIdentifier
    */
   private void traverseAndResolveTree(FilterResolverIntf filterResolverTree,
-      AbsoluteTableIdentifier tableIdentifier, TableProvider tableProvider)
+      AbsoluteTableIdentifier tableIdentifier)
       throws FilterUnsupportedException, IOException {
     if (null == filterResolverTree) {
       return;
     }
-    traverseAndResolveTree(filterResolverTree.getLeft(), tableIdentifier, 
tableProvider);
-    filterResolverTree.resolve(tableIdentifier, tableProvider);
-    traverseAndResolveTree(filterResolverTree.getRight(), tableIdentifier, 
tableProvider);
+    traverseAndResolveTree(filterResolverTree.getLeft(), tableIdentifier);
+    filterResolverTree.resolve(tableIdentifier);
+    traverseAndResolveTree(filterResolverTree.getRight(), tableIdentifier);
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterProcessor.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterProcessor.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterProcessor.java
index 1ae795e..91cc0f8 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterProcessor.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterProcessor.java
@@ -38,7 +38,7 @@ public interface FilterProcessor {
    * @throws FilterUnsupportedException
    */
   FilterResolverIntf getFilterResolver(Expression expressionTree,
-      AbsoluteTableIdentifier tableIdentifier, TableProvider tableProvider)
+      AbsoluteTableIdentifier tableIdentifier)
       throws FilterUnsupportedException, IOException;
 
   /**

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java
index c91eb2e..2032ddb 100644
--- a/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java
+++ b/core/src/main/java/org/apache/carbondata/core/scan/filter/FilterUtil.java
@@ -54,6 +54,7 @@ import 
org.apache.carbondata.core.keygenerator.KeyGenException;
 import org.apache.carbondata.core.keygenerator.KeyGenerator;
 import 
org.apache.carbondata.core.keygenerator.mdkey.MultiDimKeyVarLengthGenerator;
 import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
+import org.apache.carbondata.core.metadata.CarbonMetadata;
 import org.apache.carbondata.core.metadata.ColumnIdentifier;
 import org.apache.carbondata.core.metadata.datatype.DataType;
 import org.apache.carbondata.core.metadata.datatype.DataTypes;
@@ -535,8 +536,7 @@ public final class FilterUtil {
    * @throws QueryExecutionException
    */
   public static ColumnFilterInfo getFilterValues(AbsoluteTableIdentifier 
tableIdentifier,
-      ColumnExpression columnExpression, List<String> evaluateResultList, 
boolean isIncludeFilter,
-      TableProvider tableProvider)
+      ColumnExpression columnExpression, List<String> evaluateResultList, 
boolean isIncludeFilter)
       throws QueryExecutionException, FilterUnsupportedException, IOException {
     Dictionary forwardDictionary = null;
     ColumnFilterInfo filterInfo = null;
@@ -545,8 +545,7 @@ public final class FilterUtil {
     try {
       // Reading the dictionary value from cache.
       forwardDictionary =
-          getForwardDictionaryCache(tableIdentifier, 
columnExpression.getDimension(),
-              tableProvider);
+          getForwardDictionaryCache(tableIdentifier, 
columnExpression.getDimension());
       sortFilterModelMembers(columnExpression, evaluateResultList);
       getDictionaryValue(evaluateResultList, forwardDictionary, surrogates);
       filterInfo =
@@ -566,7 +565,6 @@ public final class FilterUtil {
    *
    * @param forwardDictionary
    * @param isIncludeFilter
-   * @param filterInfo
    * @param surrogates
    * @return
    */
@@ -704,14 +702,12 @@ public final class FilterUtil {
    */
   public static ColumnFilterInfo 
getFilterListForAllValues(AbsoluteTableIdentifier tableIdentifier,
       Expression expression, final ColumnExpression columnExpression, boolean 
isIncludeFilter,
-      TableProvider tableProvider, boolean isExprEvalReqd)
-      throws FilterUnsupportedException, IOException {
+      boolean isExprEvalReqd) throws FilterUnsupportedException, IOException {
     Dictionary forwardDictionary = null;
     List<Integer> surrogates = new ArrayList<Integer>(20);
     try {
       forwardDictionary =
-          getForwardDictionaryCache(tableIdentifier, 
columnExpression.getDimension(),
-              tableProvider);
+          getForwardDictionaryCache(tableIdentifier, 
columnExpression.getDimension());
       if (isExprEvalReqd && !isIncludeFilter) {
         surrogates.add(CarbonCommonConstants.DICT_VALUE_NULL);
       }
@@ -1238,35 +1234,25 @@ public final class FilterUtil {
   }
 
   /**
-   * @param tableIdentifier
+   * @param dictionarySourceAbsoluteTableIdentifier
    * @param carbonDimension
    * @return
    */
-  public static Dictionary getForwardDictionaryCache(AbsoluteTableIdentifier 
tableIdentifier,
-      CarbonDimension carbonDimension) throws IOException {
-    return getForwardDictionaryCache(tableIdentifier, carbonDimension, null);
-  }
-
-  /**
-   * @param carbonDimension
-   * @param tableProvider
-   * @return
-   */
   public static Dictionary getForwardDictionaryCache(
       AbsoluteTableIdentifier dictionarySourceAbsoluteTableIdentifier,
-      CarbonDimension carbonDimension, TableProvider tableProvider) throws 
IOException {
+      CarbonDimension carbonDimension) throws IOException {
     String dictionaryPath = null;
     ColumnIdentifier columnIdentifier = carbonDimension.getColumnIdentifier();
-    if (null != tableProvider) {
-      CarbonTable carbonTable = tableProvider
-          
.getCarbonTable(dictionarySourceAbsoluteTableIdentifier.getCarbonTableIdentifier());
+    CarbonTable carbonTable = CarbonMetadata.getInstance()
+        
.getCarbonTable(dictionarySourceAbsoluteTableIdentifier.getDatabaseName(),
+            dictionarySourceAbsoluteTableIdentifier.getTableName());
+    if (null != carbonTable) {
       dictionaryPath = 
carbonTable.getTableInfo().getFactTable().getTableProperties()
           .get(CarbonCommonConstants.DICTIONARY_PATH);
-      if (null != 
carbonDimension.getColumnSchema().getParentColumnTableRelations() &&
-          
carbonDimension.getColumnSchema().getParentColumnTableRelations().size() == 1) {
-        dictionarySourceAbsoluteTableIdentifier =
-            QueryUtil.getTableIdentifierForColumn(carbonDimension,
-                carbonTable.getAbsoluteTableIdentifier());
+      if (null != 
carbonDimension.getColumnSchema().getParentColumnTableRelations()
+          && 
carbonDimension.getColumnSchema().getParentColumnTableRelations().size() == 1) {
+        dictionarySourceAbsoluteTableIdentifier = QueryUtil
+            .getTableIdentifierForColumn(carbonDimension, 
carbonTable.getAbsoluteTableIdentifier());
         columnIdentifier = new ColumnIdentifier(
             
carbonDimension.getColumnSchema().getParentColumnTableRelations().get(0).getColumnId(),
             carbonDimension.getColumnProperties(), 
carbonDimension.getDataType());

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/SingleTableProvider.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/SingleTableProvider.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/SingleTableProvider.java
deleted file mode 100644
index d72e798..0000000
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/SingleTableProvider.java
+++ /dev/null
@@ -1,41 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.carbondata.core.scan.filter;
-
-import java.io.IOException;
-
-import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
-import org.apache.carbondata.core.metadata.schema.table.CarbonTable;
-
-public class SingleTableProvider implements TableProvider {
-
-  private CarbonTable carbonTable;
-
-  public SingleTableProvider(CarbonTable carbonTable) {
-    this.carbonTable = carbonTable;
-  }
-
-  @Override public CarbonTable getCarbonTable(CarbonTableIdentifier 
carbonTableIdentifier)
-      throws IOException {
-    if (carbonTable.getCarbonTableIdentifier().getTableUniqueName()
-        .equals(carbonTableIdentifier.getTableUniqueName())) {
-      return carbonTable;
-    } else {
-      throw new IOException("Carbon table does not exist with identifier " + 
carbonTableIdentifier);
-    }
-  }
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/TableProvider.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/TableProvider.java 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/TableProvider.java
deleted file mode 100644
index d3fa15a..0000000
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/TableProvider.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.carbondata.core.scan.filter;
-
-import java.io.IOException;
-import java.io.Serializable;
-
-import org.apache.carbondata.core.metadata.CarbonTableIdentifier;
-import org.apache.carbondata.core.metadata.schema.table.CarbonTable;
-
-public interface TableProvider extends Serializable {
-
-  CarbonTable getCarbonTable(CarbonTableIdentifier carbonTableIdentifier) 
throws IOException;
-
-}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/ConditionalFilterResolverImpl.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/ConditionalFilterResolverImpl.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/ConditionalFilterResolverImpl.java
index 996965d..ccbbc32 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/ConditionalFilterResolverImpl.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/ConditionalFilterResolverImpl.java
@@ -31,7 +31,6 @@ import 
org.apache.carbondata.core.scan.expression.conditional.ConditionalExpress
 import 
org.apache.carbondata.core.scan.expression.exception.FilterUnsupportedException;
 import org.apache.carbondata.core.scan.expression.logical.RangeExpression;
 import org.apache.carbondata.core.scan.filter.FilterUtil;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 import org.apache.carbondata.core.scan.filter.intf.FilterExecuterType;
 import 
org.apache.carbondata.core.scan.filter.resolver.metadata.FilterResolverMetadata;
 import 
org.apache.carbondata.core.scan.filter.resolver.resolverinfo.DimColumnResolvedFilterInfo;
@@ -67,8 +66,7 @@ public class ConditionalFilterResolverImpl implements 
FilterResolverIntf {
    *
    * @throws FilterUnsupportedException
    */
-  @Override public void resolve(AbsoluteTableIdentifier 
absoluteTableIdentifier,
-      TableProvider tableProvider)
+  @Override public void resolve(AbsoluteTableIdentifier 
absoluteTableIdentifier)
       throws FilterUnsupportedException, IOException {
     FilterResolverMetadata metadata = new FilterResolverMetadata();
     metadata.setTableIdentifier(absoluteTableIdentifier);
@@ -81,7 +79,6 @@ public class ConditionalFilterResolverImpl implements 
FilterResolverIntf {
         metadata.setColumnExpression(columnExpression);
         metadata.setExpression(rightExp);
         metadata.setIncludeFilter(isIncludeFilter);
-        metadata.setTableProvider(tableProvider);
         // If imei=imei comes in filter condition then we need to
         // skip processing of right expression.
         // This flow has reached here assuming that this is a single
@@ -117,7 +114,6 @@ public class ConditionalFilterResolverImpl implements 
FilterResolverIntf {
         metadata.setColumnExpression(columnExpression);
         metadata.setExpression(leftExp);
         metadata.setIncludeFilter(isIncludeFilter);
-        metadata.setTableProvider(tableProvider);
         if (columnExpression.getDataType().equals(DataTypes.TIMESTAMP) ||
             columnExpression.getDataType().equals(DataTypes.DATE)) {
           isExpressionResolve = true;
@@ -153,7 +149,6 @@ public class ConditionalFilterResolverImpl implements 
FilterResolverIntf {
       metadata.setColumnExpression(columnList.get(0));
       metadata.setExpression(exp);
       metadata.setIncludeFilter(isIncludeFilter);
-      metadata.setTableProvider(tableProvider);
       if ((null != columnList.get(0).getDimension()) && (
           !columnList.get(0).getDimension().hasEncoding(Encoding.DICTIONARY) 
|| columnList.get(0)
               .getDimension().hasEncoding(Encoding.DIRECT_DICTIONARY))
@@ -167,7 +162,7 @@ public class ConditionalFilterResolverImpl implements 
FilterResolverIntf {
               ! 
columnList.get(0).getDimension().getDataType().isComplexType())) {
         dimColResolvedFilterInfo.setFilterValues(FilterUtil
             .getFilterListForAllValues(absoluteTableIdentifier, exp, 
columnList.get(0),
-                isIncludeFilter, tableProvider, isExpressionResolve));
+                isIncludeFilter, isExpressionResolve));
 
         
dimColResolvedFilterInfo.setColumnIndex(columnList.get(0).getDimension().getOrdinal());
         
dimColResolvedFilterInfo.setDimension(columnList.get(0).getDimension());

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/FilterResolverIntf.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/FilterResolverIntf.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/FilterResolverIntf.java
index a0810d5..89a3890 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/FilterResolverIntf.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/FilterResolverIntf.java
@@ -25,7 +25,6 @@ import 
org.apache.carbondata.core.datastore.block.SegmentProperties;
 import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.scan.expression.Expression;
 import 
org.apache.carbondata.core.scan.expression.exception.FilterUnsupportedException;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 import org.apache.carbondata.core.scan.filter.intf.FilterExecuterType;
 import 
org.apache.carbondata.core.scan.filter.resolver.resolverinfo.DimColumnResolvedFilterInfo;
 import 
org.apache.carbondata.core.scan.filter.resolver.resolverinfo.MeasureColumnResolvedFilterInfo;
@@ -40,7 +39,7 @@ public interface FilterResolverIntf extends Serializable {
    * @throws IOException
    * @throws FilterUnsupportedException
    */
-  void resolve(AbsoluteTableIdentifier absoluteTableIdentifier, TableProvider 
tableProvider)
+  void resolve(AbsoluteTableIdentifier absoluteTableIdentifier)
       throws IOException, FilterUnsupportedException;
 
   /**

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/LogicalFilterResolverImpl.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/LogicalFilterResolverImpl.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/LogicalFilterResolverImpl.java
index d530155..368cd9a 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/LogicalFilterResolverImpl.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/LogicalFilterResolverImpl.java
@@ -24,7 +24,6 @@ import 
org.apache.carbondata.core.datastore.block.SegmentProperties;
 import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.scan.expression.BinaryExpression;
 import org.apache.carbondata.core.scan.expression.Expression;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 import org.apache.carbondata.core.scan.filter.intf.ExpressionType;
 import org.apache.carbondata.core.scan.filter.intf.FilterExecuterType;
 import 
org.apache.carbondata.core.scan.filter.resolver.resolverinfo.DimColumnResolvedFilterInfo;
@@ -57,10 +56,8 @@ public class LogicalFilterResolverImpl implements 
FilterResolverIntf {
    * node for filter evaluation, so in this instance no implementation is 
required.
    *
    * @param absoluteTableIdentifier
-   * @param tableProvider
    */
-  @Override public void resolve(AbsoluteTableIdentifier 
absoluteTableIdentifier,
-      TableProvider tableProvider) {
+  @Override public void resolve(AbsoluteTableIdentifier 
absoluteTableIdentifier) {
 
   }
 

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelFilterResolverImpl.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelFilterResolverImpl.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelFilterResolverImpl.java
index c846c02..f4d6fe8 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelFilterResolverImpl.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelFilterResolverImpl.java
@@ -25,7 +25,6 @@ import 
org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.scan.expression.ColumnExpression;
 import org.apache.carbondata.core.scan.expression.Expression;
 import 
org.apache.carbondata.core.scan.expression.conditional.ConditionalExpression;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 import org.apache.carbondata.core.scan.filter.intf.FilterExecuterType;
 import 
org.apache.carbondata.core.scan.filter.resolver.resolverinfo.DimColumnResolvedFilterInfo;
 import 
org.apache.carbondata.core.scan.filter.resolver.resolverinfo.MeasureColumnResolvedFilterInfo;
@@ -52,8 +51,7 @@ public class RowLevelFilterResolverImpl extends 
ConditionalFilterResolverImpl {
    * Method which will resolve the filter expression by converting the filter 
member
    * to its assigned dictionary values.
    */
-  public void resolve(AbsoluteTableIdentifier absoluteTableIdentifier,
-      TableProvider tableProvider) {
+  public void resolve(AbsoluteTableIdentifier absoluteTableIdentifier) {
     DimColumnResolvedFilterInfo dimColumnEvaluatorInfo = null;
     MeasureColumnResolvedFilterInfo msrColumnEvalutorInfo = null;
     int index = 0;

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java
index c83e662..2bc73c5 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/RowLevelRangeFilterResolverImpl.java
@@ -41,7 +41,6 @@ import 
org.apache.carbondata.core.scan.expression.exception.FilterUnsupportedExc
 import 
org.apache.carbondata.core.scan.expression.logical.BinaryLogicalExpression;
 import org.apache.carbondata.core.scan.filter.ColumnFilterInfo;
 import org.apache.carbondata.core.scan.filter.FilterUtil;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 import org.apache.carbondata.core.scan.filter.intf.FilterExecuterType;
 import 
org.apache.carbondata.core.scan.filter.resolver.resolverinfo.DimColumnResolvedFilterInfo;
 import 
org.apache.carbondata.core.scan.filter.resolver.resolverinfo.MeasureColumnResolvedFilterInfo;
@@ -228,7 +227,7 @@ public class RowLevelRangeFilterResolverImpl extends 
ConditionalFilterResolverIm
    * Method which will resolve the filter expression by converting the filter
    * member to its assigned dictionary values.
    */
-  public void resolve(AbsoluteTableIdentifier absoluteTableIdentifier, 
TableProvider tableProvider)
+  public void resolve(AbsoluteTableIdentifier absoluteTableIdentifier)
       throws FilterUnsupportedException {
     DimColumnResolvedFilterInfo dimColumnEvaluatorInfo = null;
     MeasureColumnResolvedFilterInfo msrColumnEvalutorInfo = null;

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/metadata/FilterResolverMetadata.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/metadata/FilterResolverMetadata.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/metadata/FilterResolverMetadata.java
index 8db80dc..324a94f 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/metadata/FilterResolverMetadata.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/metadata/FilterResolverMetadata.java
@@ -19,22 +19,12 @@ package 
org.apache.carbondata.core.scan.filter.resolver.metadata;
 import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.scan.expression.ColumnExpression;
 import org.apache.carbondata.core.scan.expression.Expression;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 
 public class FilterResolverMetadata {
   private AbsoluteTableIdentifier tableIdentifier;
   private Expression expression;
   private ColumnExpression columnExpression;
 
-  public TableProvider getTableProvider() {
-    return tableProvider;
-  }
-
-  public void setTableProvider(TableProvider tableProvider) {
-    this.tableProvider = tableProvider;
-  }
-
-  private TableProvider tableProvider;
   private boolean isIncludeFilter;
 
   public AbsoluteTableIdentifier getTableIdentifier() {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/FalseConditionalResolverImpl.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/FalseConditionalResolverImpl.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/FalseConditionalResolverImpl.java
index 63ce790..b5468ce 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/FalseConditionalResolverImpl.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/FalseConditionalResolverImpl.java
@@ -18,7 +18,6 @@ package 
org.apache.carbondata.core.scan.filter.resolver.resolverinfo;
 
 import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.scan.expression.Expression;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 import org.apache.carbondata.core.scan.filter.intf.FilterExecuterType;
 import 
org.apache.carbondata.core.scan.filter.resolver.ConditionalFilterResolverImpl;
 
@@ -32,8 +31,7 @@ public class FalseConditionalResolverImpl extends 
ConditionalFilterResolverImpl
     super(exp, isExpressionResolve, isIncludeFilter, false);
   }
 
-  @Override public void resolve(AbsoluteTableIdentifier 
absoluteTableIdentifier,
-      TableProvider tableProvider) {
+  @Override public void resolve(AbsoluteTableIdentifier 
absoluteTableIdentifier) {
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/TrueConditionalResolverImpl.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/TrueConditionalResolverImpl.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/TrueConditionalResolverImpl.java
index 104f69e..c316b5c 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/TrueConditionalResolverImpl.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/TrueConditionalResolverImpl.java
@@ -19,7 +19,6 @@ package 
org.apache.carbondata.core.scan.filter.resolver.resolverinfo;
 
 import org.apache.carbondata.core.metadata.AbsoluteTableIdentifier;
 import org.apache.carbondata.core.scan.expression.Expression;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 import org.apache.carbondata.core.scan.filter.intf.FilterExecuterType;
 import 
org.apache.carbondata.core.scan.filter.resolver.ConditionalFilterResolverImpl;
 
@@ -33,8 +32,7 @@ public class TrueConditionalResolverImpl extends 
ConditionalFilterResolverImpl {
     super(exp, isExpressionResolve, isIncludeFilter, false);
   }
 
-  @Override public void resolve(AbsoluteTableIdentifier 
absoluteTableIdentifier,
-      TableProvider tableProvider) {
+  @Override public void resolve(AbsoluteTableIdentifier 
absoluteTableIdentifier) {
   }
 
   /**

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/DictionaryColumnVisitor.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/DictionaryColumnVisitor.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/DictionaryColumnVisitor.java
index ee205ee..d2eecc9 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/DictionaryColumnVisitor.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/DictionaryColumnVisitor.java
@@ -58,7 +58,7 @@ public class DictionaryColumnVisitor implements 
ResolvedFilterInfoVisitorIntf {
 
         resolvedFilterObject = FilterUtil
             .getFilterValues(metadata.getTableIdentifier(), 
metadata.getColumnExpression(),
-                evaluateResultListFinal, metadata.isIncludeFilter(), 
metadata.getTableProvider());
+                evaluateResultListFinal, metadata.isIncludeFilter());
         if (!metadata.isIncludeFilter() && null != resolvedFilterObject) {
           // Adding default surrogate key of null member inorder to not 
display the same while
           // displaying the report as per hive compatibility.

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/RangeDictionaryColumnVisitor.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/RangeDictionaryColumnVisitor.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/RangeDictionaryColumnVisitor.java
index b1e5a7d..a3ecd12 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/RangeDictionaryColumnVisitor.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/filter/resolver/resolverinfo/visitor/RangeDictionaryColumnVisitor.java
@@ -48,8 +48,7 @@ public class RangeDictionaryColumnVisitor extends 
DictionaryColumnVisitor
       ColumnFilterInfo resolvedFilterObject = null;
       resolvedFilterObject = FilterUtil
           .getFilterListForAllValues(metadata.getTableIdentifier(), 
metadata.getExpression(),
-              metadata.getColumnExpression(), metadata.isIncludeFilter(),
-              metadata.getTableProvider(), true);
+              metadata.getColumnExpression(), metadata.isIncludeFilter(), 
true);
 
       if (!metadata.isIncludeFilter() && null != resolvedFilterObject) {
         // Adding default surrogate key of null member inorder to not display 
the same while

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/core/src/main/java/org/apache/carbondata/core/scan/model/QueryModelBuilder.java
----------------------------------------------------------------------
diff --git 
a/core/src/main/java/org/apache/carbondata/core/scan/model/QueryModelBuilder.java
 
b/core/src/main/java/org/apache/carbondata/core/scan/model/QueryModelBuilder.java
index 31f5d0b..198608f 100644
--- 
a/core/src/main/java/org/apache/carbondata/core/scan/model/QueryModelBuilder.java
+++ 
b/core/src/main/java/org/apache/carbondata/core/scan/model/QueryModelBuilder.java
@@ -24,7 +24,6 @@ import 
org.apache.carbondata.core.metadata.schema.table.CarbonTable;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonDimension;
 import org.apache.carbondata.core.metadata.schema.table.column.CarbonMeasure;
 import org.apache.carbondata.core.scan.expression.Expression;
-import org.apache.carbondata.core.scan.filter.SingleTableProvider;
 import org.apache.carbondata.core.scan.filter.resolver.FilterResolverIntf;
 import org.apache.carbondata.core.util.DataTypeConverter;
 
@@ -113,8 +112,7 @@ public class QueryModelBuilder {
     table.processFilterExpression(filterExpression, isFilterDimensions, 
isFilterMeasures);
     queryModel.setIsFilterDimensions(isFilterDimensions);
     queryModel.setIsFilterMeasures(isFilterMeasures);
-    FilterResolverIntf filterIntf =
-        table.resolveFilter(filterExpression, new SingleTableProvider(table));
+    FilterResolverIntf filterIntf = table.resolveFilter(filterExpression);
     queryModel.setFilterExpressionResolverTree(filterIntf);
     return queryModel;
   }

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonFileInputFormat.java
----------------------------------------------------------------------
diff --git 
a/hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonFileInputFormat.java
 
b/hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonFileInputFormat.java
index 0e8cf6a..8ed89d5 100644
--- 
a/hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonFileInputFormat.java
+++ 
b/hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonFileInputFormat.java
@@ -39,8 +39,6 @@ import org.apache.carbondata.core.mutate.UpdateVO;
 import org.apache.carbondata.core.readcommitter.LatestFilesReadCommittedScope;
 import org.apache.carbondata.core.readcommitter.ReadCommittedScope;
 import org.apache.carbondata.core.scan.expression.Expression;
-import org.apache.carbondata.core.scan.filter.SingleTableProvider;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 import org.apache.carbondata.core.scan.filter.resolver.FilterResolverIntf;
 import org.apache.carbondata.core.statusmanager.LoadMetadataDetails;
 import org.apache.carbondata.core.statusmanager.SegmentUpdateStatusManager;
@@ -125,12 +123,11 @@ public class CarbonFileInputFormat<T> extends 
CarbonInputFormat<T> implements Se
         readCommittedScope = new 
LatestFilesReadCommittedScope(identifier.getTablePath());
       }
       Expression filter = getFilterPredicates(job.getConfiguration());
-      TableProvider tableProvider = new SingleTableProvider(carbonTable);
       // this will be null in case of corrupt schema file.
       PartitionInfo partitionInfo = 
carbonTable.getPartitionInfo(carbonTable.getTableName());
       carbonTable.processFilterExpression(filter, null, null);
 
-      FilterResolverIntf filterInterface = carbonTable.resolveFilter(filter, 
tableProvider);
+      FilterResolverIntf filterInterface = carbonTable.resolveFilter(filter);
 
       String segmentDir = null;
       if (carbonTable.isTransactionalTable()) {

http://git-wip-us.apache.org/repos/asf/carbondata/blob/2c0fa107/hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableInputFormat.java
----------------------------------------------------------------------
diff --git 
a/hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableInputFormat.java
 
b/hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableInputFormat.java
index cd34bb8..990e9a7 100644
--- 
a/hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableInputFormat.java
+++ 
b/hadoop/src/main/java/org/apache/carbondata/hadoop/api/CarbonTableInputFormat.java
@@ -51,8 +51,6 @@ import 
org.apache.carbondata.core.readcommitter.TableStatusReadCommittedScope;
 import org.apache.carbondata.core.reader.CarbonIndexFileReader;
 import org.apache.carbondata.core.scan.expression.Expression;
 import org.apache.carbondata.core.scan.filter.FilterExpressionProcessor;
-import org.apache.carbondata.core.scan.filter.SingleTableProvider;
-import org.apache.carbondata.core.scan.filter.TableProvider;
 import org.apache.carbondata.core.scan.filter.resolver.FilterResolverIntf;
 import org.apache.carbondata.core.statusmanager.FileFormat;
 import org.apache.carbondata.core.statusmanager.LoadMetadataDetails;
@@ -224,7 +222,6 @@ public class CarbonTableInputFormat<T> extends 
CarbonInputFormat<T> {
 
     // process and resolve the expression
     Expression filter = getFilterPredicates(job.getConfiguration());
-    TableProvider tableProvider = new SingleTableProvider(carbonTable);
     // this will be null in case of corrupt schema file.
     PartitionInfo partitionInfo = 
carbonTable.getPartitionInfo(carbonTable.getTableName());
     carbonTable.processFilterExpression(filter, null, null);
@@ -242,7 +239,7 @@ public class CarbonTableInputFormat<T> extends 
CarbonInputFormat<T> {
       }
     }
 
-    FilterResolverIntf filterInterface = carbonTable.resolveFilter(filter, 
tableProvider);
+    FilterResolverIntf filterInterface = carbonTable.resolveFilter(filter);
 
     // do block filtering and get split
     List<InputSplit> splits =
@@ -440,7 +437,6 @@ public class CarbonTableInputFormat<T> extends 
CarbonInputFormat<T> {
 
       carbonTable.processFilterExpression(filter, null, null);
 
-      TableProvider tableProvider = new SingleTableProvider(carbonTable);
       // prune partitions for filter query on partition table
       String partitionIds = job.getConfiguration().get(ALTER_PARTITION_ID);
       // matchedPartitions records partitionIndex, not partitionId
@@ -457,7 +453,7 @@ public class CarbonTableInputFormat<T> extends 
CarbonInputFormat<T> {
         }
       }
 
-      FilterResolverIntf filterInterface = carbonTable.resolveFilter(filter, 
tableProvider);
+      FilterResolverIntf filterInterface = carbonTable.resolveFilter(filter);
       // do block filtering and get split
       List<InputSplit> splits = getSplits(job, filterInterface, segmentList, 
matchedPartitions,
           partitionInfo, oldPartitionIdList, new 
SegmentUpdateStatusManager(carbonTable));

Reply via email to