Github user cloud-fan commented on a diff in the pull request:
https://github.com/apache/spark/pull/19811#discussion_r156928205
--- Diff:
sql/core/src/main/scala/org/apache/spark/sql/execution/ColumnarBatchScan.scala
---
@@ -68,30 +68,26 @@ private[sql] trait ColumnarBatchScan extends
CodegenSupport {
*/
// TODO: return ColumnarBatch.Rows instead
override protected def doProduce(ctx: CodegenContext): String = {
- val input = ctx.freshName("input")
// PhysicalRDD always just has one input
- ctx.addMutableState("scala.collection.Iterator", input, s"$input =
inputs[0];")
+ val input = ctx.addMutableState("scala.collection.Iterator", "input",
+ v => s"$v = inputs[0];", forceInline = true)
--- End diff --
why inline?
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]