Skip to content

Commit 7057f8b

Browse files
committed
Addressing Sean's review comments
1 parent e7871f3 commit 7057f8b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

sql/core/src/test/scala/org/apache/spark/sql/sources/SaveLoadSuite.scala

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
package org.apache.spark.sql.sources
1919

2020
import java.io.File
21+
import java.nio.charset.StandardCharsets
2122
import java.nio.file.{Files, Paths}
2223

2324
import org.scalatest.BeforeAndAfter
@@ -144,14 +145,14 @@ class SaveLoadSuite extends DataSourceTest with SharedSQLContext with BeforeAndA
144145
}
145146
}
146147

147-
test("skip empty files in load") {
148+
test("skip empty files in non bucketed read") {
148149
withTempDir { dir =>
149150
val path = dir.getCanonicalPath
150151
Files.write(Paths.get(path, "empty"), Array.empty[Byte])
151-
Files.write(Paths.get(path, "notEmpty"), "a".getBytes)
152+
Files.write(Paths.get(path, "notEmpty"), "a".getBytes(StandardCharsets.UTF_8))
152153
val readback = spark.read.option("wholetext", true).text(path)
153154

154-
assert(readback.rdd.getNumPartitions == 1)
155+
assert(readback.rdd.getNumPartitions === 1)
155156
}
156157
}
157158
}

0 commit comments

Comments
 (0)