[ 
https://issues.apache.org/jira/browse/SPARK-13870?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dongjoon Hyun updated SPARK-13870:
----------------------------------
    Description: 
When initial creating `CVSSuite.scala` in [SPARK-12833], there was a typo on 
`scalastyle:on` like the following. So, it turns off ScalaStyle checking for 
the rest of the file mistakenly.
{code:title=CSVSuite.scala|borderStyle=solid}
// scalastyle:off
...
//scalstyle:on
{code}

So, it can not find a violation on the code of `[SPARK-12668]` added recently. 
This issue fixes the existing escaping correctly and adds a new escaping for 
`[SPARK-12668]` code like the following.
{code:title=CSVSuite.scala|borderStyle=solid}
   test("test aliases sep and encoding for delimiter and charset") {
+    // scalastyle:off
     val cars = sqlContext
       .read
       .format("csv")
@@ -173,6 +174,7 @@ class CSVSuite extends QueryTest with SharedSQLContext with 
SQLTestUtils {
       .option("encoding", "iso-8859-1")
       .option("sep", "þ")
       .load(testFile(carsFile8859))
+    // scalastyle:on
{code}
This will prevent future potential problems, too.

  was:
When initial creating `CVSSuite.scala` in [SPARK-12833], there was a typo on 
`scalastyle:on` like the following. So, it turns off ScalaStyle checking for 
the rest of the file mistakenly.
{code:title=CSVSuite.scala|borderStyle=solid}
// scalastyle:off
...
//scalstyle:on
{code}

So, it can not find a violation on the code of `[SPARK-12668]` added recently. 
This issue fixes the existing escaping correctly and adds a new escaping for 
`[SPARK-12668]` code like the following.
{code:title=CSVSuite.scala|borderStyle=solid}
   test("test aliases sep and encoding for delimiter and charset") {
+    // scalastyle:off
     val cars = sqlContext
       .read
       .format("csv")
@@ -173,6 +174,7 @@ class CSVSuite extends QueryTest with SharedSQLContext with 
SQLTestUtils {
       .option("encoding", "iso-8859-1")
       .option("sep", "þ")
       .load(testFile(carsFile8859))
+    // scalastyle:on
{code}
This will prevent future potential problem, too.


> Add scalastyle escaping correctly in CVSSuite.scala
> ---------------------------------------------------
>
>                 Key: SPARK-13870
>                 URL: https://issues.apache.org/jira/browse/SPARK-13870
>             Project: Spark
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Dongjoon Hyun
>            Priority: Trivial
>
> When initial creating `CVSSuite.scala` in [SPARK-12833], there was a typo on 
> `scalastyle:on` like the following. So, it turns off ScalaStyle checking for 
> the rest of the file mistakenly.
> {code:title=CSVSuite.scala|borderStyle=solid}
> // scalastyle:off
> ...
> //scalstyle:on
> {code}
> So, it can not find a violation on the code of `[SPARK-12668]` added 
> recently. This issue fixes the existing escaping correctly and adds a new 
> escaping for `[SPARK-12668]` code like the following.
> {code:title=CSVSuite.scala|borderStyle=solid}
>    test("test aliases sep and encoding for delimiter and charset") {
> +    // scalastyle:off
>      val cars = sqlContext
>        .read
>        .format("csv")
> @@ -173,6 +174,7 @@ class CSVSuite extends QueryTest with SharedSQLContext 
> with SQLTestUtils {
>        .option("encoding", "iso-8859-1")
>        .option("sep", "þ")
>        .load(testFile(carsFile8859))
> +    // scalastyle:on
> {code}
> This will prevent future potential problems, too.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to