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

    https://github.com/apache/spark/pull/4500#discussion_r25687975
  
    --- Diff: 
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveComparisonTest.scala
 ---
    @@ -241,7 +241,11 @@ abstract class HiveComparisonTest
           // Clear old output for this testcase.
           outputDirectories.map(new File(_, 
testCaseName)).filter(_.exists()).foreach(_.delete())
     
    -      val allQueries = sql.split("(?<=[^\\\\]);").map(_.trim).filterNot(q 
=> q == "").toSeq
    +      val sqlWithoutComment =
    +        sql.split("\n").filterNot(l => l.matches("--.*(?<=[^\\\\]);"))
    +          .reduce((l1, l2) => l1 + "\n" + l2)
    --- End diff --
    
    Seems this is enough?
    
    ```scala
    val sqlWithoutComment = 
sql.split("\n").filterNot(_.startsWith("--")).mkString("\n")
    ```


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to