Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/18747#discussion_r144602775
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/ColumnarBatchScan.scala 
---
    @@ -84,25 +84,45 @@ private[sql] trait ColumnarBatchScan extends 
CodegenSupport {
         val columnarBatchClz = classOf[ColumnarBatch].getName
         val batch = ctx.freshName("batch")
         ctx.addMutableState(columnarBatchClz, batch, s"$batch = null;")
    +    val cachedBatchClz = 
"org.apache.spark.sql.execution.columnar.CachedBatch"
    +    val cachedBatch = ctx.freshName("cachedBatch")
     
         val idx = ctx.freshName("batchIdx")
         ctx.addMutableState("int", idx, s"$idx = 0;")
         val colVars = output.indices.map(i => ctx.freshName("colInstance" + i))
         val columnVectorClzs = vectorTypes.getOrElse(
           Seq.fill(colVars.size)(classOf[ColumnVector].getName))
    +    val columnAccessorClz = 
"org.apache.spark.sql.execution.columnar.ColumnAccessor"
    --- End diff --
    
    these table cache specific code should go to `InMemoryTableScanExec` 
instead of here.


---

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to