Skip to content

Commit 261e1b5

Browse files
committed
Address comment.
1 parent 6b562eb commit 261e1b5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/FileScanRDD.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,13 +143,13 @@ class FileScanRDD(
143143
} catch {
144144
case e @(_: RuntimeException | _: IOException) =>
145145
logWarning(s"Skipped the rest content in the corrupted file: $currentFile", e)
146-
null
146+
Iterator.empty
147147
}
148148
}
149149

150150
override def getNext(): AnyRef = {
151151
try {
152-
if (internalIter != null && internalIter.hasNext) {
152+
if (internalIter.hasNext) {
153153
internalIter.next()
154154
} else {
155155
finished = true

0 commit comments

Comments
 (0)