HyukjinKwon commented on code in PR #45209: URL: https://github.com/apache/spark/pull/45209#discussion_r1498546937
########## sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/jdbc/JDBCRDD.scala: ########## @@ -72,13 +72,25 @@ object JDBCRDD extends Logging { JdbcUtils.getSchema(rs, dialect, alwaysNullable = true, isTimestampNTZ = options.preferTimestampNTZ) } finally { - rs.close() Review Comment: Can we use ` AutoCloseable` syntax instead? That will show the original exception as well. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org