Github user jackylk commented on a diff in the pull request: https://github.com/apache/carbondata/pull/2148#discussion_r181589448 --- Diff: integration/spark2/src/main/scala/org/apache/carbondata/store/SparkCarbonStore.scala --- @@ -68,19 +78,16 @@ private[store] class SparkCarbonStore extends MetaCachedCarbonStore { filter: Expression): java.util.Iterator[CarbonRow] = { require(path != null) require(projectColumns != null) - val table = getTable(path) - val rdd = new CarbonScanRDD[CarbonRow]( - spark = session, - columnProjection = new CarbonProjection(projectColumns), - filterExpression = filter, - identifier = table.getAbsoluteTableIdentifier, - serializedTableInfo = table.getTableInfo.serialize, - tableInfo = table.getTableInfo, - inputMetricsStats = new CarbonInputMetrics, - partitionNames = null, - dataTypeConverterClz = null, - readSupportClz = classOf[CarbonRowReadSupport]) - rdd.collect + scan(getTable(path), projectColumns, filter) + } + + def scan( + carbonTable: CarbonTable, + projectColumns: Array[String], --- End diff -- Now I removed this function and use `scan` interface only
---