Github user viirya commented on a diff in the pull request:

    https://github.com/apache/spark/pull/20419#discussion_r164321458
  
    --- Diff: 
sql/core/src/main/scala/org/apache/spark/sql/execution/WholeStageCodegenExec.scala
 ---
    @@ -542,6 +542,7 @@ case class WholeStageCodegenExec(child: SparkPlan)(val 
codegenStageId: Int)
             s"""Codegend pipeline for stage (id=$codegenStageId)
                |${this.treeString.trim}""".stripMargin)}
           final class $className extends 
${classOf[BufferedRowIterator].getName} {
    +        ${ctx.registerComment(s"codegenStageId=$codegenStageId", true)}
    --- End diff --
    
    Instead of putting this comment inside the class, how about let it on top 
of it? Like:
    
    ```/* 001 */ public Object generate(Object[] references) {
    /* 002 */   return new GeneratedIteratorForCodegenStage1(references);
    /* 003 */ }
    /* 004 */
    /* 005 */ // codegenStageId=1
    /* 006 */ final class GeneratedIteratorForCodegenStage1 extends 
org.apache.spark.sql.execution.BufferedRowIterator {
    /* 007 */   private Object[] references;
    ...
    ```


---

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

Reply via email to