You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by cloud-fan <gi...@git.apache.org> on 2017/10/13 16:42:45 UTC

[GitHub] spark pull request #18747: [SPARK-20822][SQL] Generate code to directly get ...

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-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org