From 0e3aacaeb039e27731c1a67065372d1ac00faefa Mon Sep 17 00:00:00 2001 From: Maxim Lapan Date: Thu, 14 Sep 2023 12:49:50 +0200 Subject: [PATCH 1/2] Remove unused statement variable --- .../main/scala/com/exasol/spark/rdd/ExasolRDD.scala | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/exasol-jdbc/src/main/scala/com/exasol/spark/rdd/ExasolRDD.scala b/exasol-jdbc/src/main/scala/com/exasol/spark/rdd/ExasolRDD.scala index b77466e..d0e2883 100644 --- a/exasol-jdbc/src/main/scala/com/exasol/spark/rdd/ExasolRDD.scala +++ b/exasol-jdbc/src/main/scala/com/exasol/spark/rdd/ExasolRDD.scala @@ -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 = { @@ -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 { if (conn != null) { if (!conn.isClosed && !conn.getAutoCommit) { @@ -156,5 +147,4 @@ class ExasolRDD( JdbcUtils.resultSetToRows(resultSet, querySchema) } - } From 06c0071dfd086001ca3d4fc1f8d60de6e5fd478b Mon Sep 17 00:00:00 2001 From: Maxim Lapan Date: Thu, 14 Sep 2023 21:01:47 +0200 Subject: [PATCH 2/2] Add ref to the task --- doc/changes/changes_2.1.2.md | 1 + 1 file changed, 1 insertion(+) diff --git a/doc/changes/changes_2.1.2.md b/doc/changes/changes_2.1.2.md index a7bcbfa..9bc9e23 100644 --- a/doc/changes/changes_2.1.2.md +++ b/doc/changes/changes_2.1.2.md @@ -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