Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unused statement variable #205

Merged
merged 2 commits into from
Sep 15, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions exasol-jdbc/src/main/scala/com/exasol/spark/rdd/ExasolRDD.scala
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ class ExasolRDD(
override def compute(split: Partition, context: TaskContext): Iterator[Row] = {
var closed = false
var resultSet: ResultSet = null
val stmt: Statement = null
var conn: EXAConnection = null

def close(): Unit = {
Expand All @@ -110,14 +109,6 @@ class ExasolRDD(
case e: Exception => logWarning("Received an exception closing sub resultSet", e)
}

try {
if (stmt != null && !stmt.isClosed) {
stmt.close()
}
} catch {
case e: Exception => logWarning("Received an exception closing sub statement", e)
}

try {
Shmuma marked this conversation as resolved.
Show resolved Hide resolved
if (conn != null) {
if (!conn.isClosed && !conn.getAutoCommit) {
Expand Down Expand Up @@ -156,5 +147,4 @@ class ExasolRDD(

JdbcUtils.resultSetToRows(resultSet, querySchema)
}

}