Github user kiszk commented on a diff in the pull request: https://github.com/apache/spark/pull/20224#discussion_r164017562 --- Diff: sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala --- @@ -471,19 +531,21 @@ case class WholeStageCodegenExec(child: SparkPlan) extends UnaryExecNode with Co } """, inlineToOuterClass = true) + val className = generatedClassName() + val source = s""" public Object generate(Object[] references) { - return new GeneratedIterator(references); + return new $className(references); } ${ctx.registerComment(s"""Codegend pipeline for\n${child.treeString.trim}""")} - final class GeneratedIterator extends org.apache.spark.sql.execution.BufferedRowIterator { + final class $className extends ${classOf[BufferedRowIterator].getName} { --- End diff -- Thank for your changes. They look very good. I missed one fact (I was sleepy :)). `ctx.registerComment()` is enabled only when `spark.sql.codegen.comments` is `true`. It would be good to add the id in the comment regardless of `spark.sql.codegen.comments` since this comment is very small. I could create a follow-up PR this afternoon.
--- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org