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
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions doc/changes/changes_2.1.2.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Code name:

* 194: Wrong name of Exasol JDBC format in documentation
* 197: Committing transaction in the finally handler
* 198: Remove unused `Statement` variable

## Dependency Updates

Expand Down
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)
}

}