Ngone51 opened a new pull request #24133: [SPARK-27193][SQL] CodeFormatter should format multiple comment lines correctly URL: https://github.com/apache/spark/pull/24133 ## What changes were proposed in this pull request? when enable `spark.sql.codegen.comments`, there will be multiple comment lines. However, CodeFormatter can not handle multiple comment lines currently: ``` /* 001 */ public Object generate(Object[] references) { /* 002 */ return new GeneratedIteratorForCodegenStage1(references); /* 003 */ } /* 004 */ /* 005 */ /** * Codegend pipeline for stage (id=1) * *(1) Project [(id#0L + 1) AS (id + 1)#3L] * +- *(1) Filter (id#0L = 1) * +- *(1) Range (0, 10, step=1, splits=4) */ /* 006 */ // codegenStageId=1 /* 007 */ final class GeneratedIteratorForCodegenStage1 extends org.apache.spark.sql.execution.BufferedRowIterator { ``` After applying this pr: ``` /* 001 */ public Object generate(Object[] references) { /* 002 */ return new GeneratedIteratorForCodegenStage1(references); /* 003 */ } /* 004 */ /* 005 */ /** /* 006 */ * Codegend pipeline for stage (id=1) /* 007 */ * *(1) Project [(id#0L + 1) AS (id + 1)#4L] /* 008 */ * +- *(1) Filter (id#0L = 1) /* 009 */ * +- *(1) Range (0, 10, step=1, splits=2) /* 010 */ */ /* 011 */ // codegenStageId=1 /* 012 */ final class GeneratedIteratorForCodegenStage1 extends org.apache.spark.sql.execution.BufferedRowIterator { ``` ## How was this patch tested? Tested Manually.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
