Skip to content

Commit a51f877

Browse files
dongjoon-hyunrxin
authored andcommitted
[SPARK-13870][SQL] Add scalastyle escaping correctly in CVSSuite.scala
## What changes were proposed in this pull request? When initial creating `CVSSuite.scala` in SPARK-12833, there was a typo on `scalastyle:on`: `scalstyle:on`. So, it turns off ScalaStyle checking for the rest of the file mistakenly. 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. ```scala test("test aliases sep and encoding for delimiter and charset") { + // scalastyle:off val cars = sqlContext ... .load(testFile(carsFile8859)) + // scalastyle:on ``` This will prevent future potential problems, too. ## How was this patch tested? Pass the Jenkins test. Author: Dongjoon Hyun <dongjoon@apache.org> Closes #11700 from dongjoon-hyun/SPARK-13870.
1 parent 43304b1 commit a51f877

File tree

1 file changed

+3
-1
lines changed
  • sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv

1 file changed

+3
-1
lines changed

sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,19 +160,21 @@ class CSVSuite extends QueryTest with SharedSQLContext with SQLTestUtils {
160160
|OPTIONS (path "${testFile(carsFile8859)}", header "true",
161161
|charset "iso-8859-1", delimiter "þ")
162162
""".stripMargin.replaceAll("\n", " "))
163-
//scalstyle:on
163+
// scalastyle:on
164164

165165
verifyCars(sqlContext.table("carsTable"), withHeader = true)
166166
}
167167

168168
test("test aliases sep and encoding for delimiter and charset") {
169+
// scalastyle:off
169170
val cars = sqlContext
170171
.read
171172
.format("csv")
172173
.option("header", "true")
173174
.option("encoding", "iso-8859-1")
174175
.option("sep", "þ")
175176
.load(testFile(carsFile8859))
177+
// scalastyle:on
176178

177179
verifyCars(cars, withHeader = true)
178180
}

0 commit comments

Comments
 (0)