Skip to content

Commit 4289a44

Browse files
author
gcc
committed
[SPARK-12048][SQL] Prevent to close JDBC resources twice
1 parent 2db4662 commit 4289a44

File tree

1 file changed

+1
-0
lines changed
  • sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -509,6 +509,7 @@ private[sql] class JDBCRDD(
509509
} catch {
510510
case e: Exception => logWarning("Exception closing connection", e)
511511
}
512+
closed = true
512513
}
513514

514515
override def hasNext: Boolean = {

0 commit comments

Comments
 (0)