You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2020/03/28 06:44:36 UTC

[GitHub] [spark] maropu commented on a change in pull request #28041: [SPARK-30564][SQL] Improved extra new line and comment remove

maropu commented on a change in pull request #28041: [SPARK-30564][SQL] Improved extra new line and comment remove
URL: https://github.com/apache/spark/pull/28041#discussion_r399628268
 
 

 ##########
 File path: sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/codegen/CodeFormatterSuite.scala
 ##########
 @@ -61,28 +61,36 @@ class CodeFormatterSuite extends SparkFunSuite {
         |  * line
         |  * comments
         |  */
+        |  // comment
         |
         |public function() {
         |/*comment*/
         |  /*comment_with_space*/
-        |code_body
+        |code_body /* comment */ code_body/**/code_body // comment
         |//comment
-        |code_body
+        |code_body /*
+        |  * multi
+        |  * line
+        |  * comments
+        |  */
         |  //comment_with_space
         |
-        |code_body
+        |code_body // comment
+        | /*
+        |  * multi
+        |  * line
+        |  * comments
+        |  */
         |}
       """.stripMargin
 
     val reducedCode = CodeFormatter.stripExtraNewLinesAndComments(code)
     assert(reducedCode ===
-      """
-        |public function() {
+      """public function() {
+        |code_body code_body code_body
         |code_body
         |code_body
-        |code_body
-        |}
-      """.stripMargin)
+        |}""".stripMargin)
 
 Review comment:
   Can we add a new test unit instead of modifying the existing tests?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

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