File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
sql/core/src/test/scala/org/apache/spark/sql/sources Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 18
18
package org .apache .spark .sql .sources
19
19
20
20
import java .io .File
21
+ import java .nio .charset .StandardCharsets
21
22
import java .nio .file .{Files , Paths }
22
23
23
24
import org .scalatest .BeforeAndAfter
@@ -144,14 +145,14 @@ class SaveLoadSuite extends DataSourceTest with SharedSQLContext with BeforeAndA
144
145
}
145
146
}
146
147
147
- test(" skip empty files in load " ) {
148
+ test(" skip empty files in non bucketed read " ) {
148
149
withTempDir { dir =>
149
150
val path = dir.getCanonicalPath
150
151
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 ) )
152
153
val readback = spark.read.option(" wholetext" , true ).text(path)
153
154
154
- assert(readback.rdd.getNumPartitions == 1 )
155
+ assert(readback.rdd.getNumPartitions === 1 )
155
156
}
156
157
}
157
158
}
You can’t perform that action at this time.
0 commit comments