Skip to content

Commit

Permalink
[SPARK-49080][SQL][TEST] Upgrade mssql-jdbc to 12.8.0.jre11 and MsS…
Browse files Browse the repository at this point in the history
…QLServer docker image tag to `2022-CU14-ubuntu-22.04`

### What changes were proposed in this pull request?

This PR aims to upgrade `mssql-jdbc` to 12.8.0.jre11 and MySQLServer docker image to `mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04`.

### Why are the changes needed?

This is the latest stable version of `mssql-jdbc`,  related release notes:

https://github.com/microsoft/mssql-jdbc/releases/tag/v12.7.0
https://github.com/microsoft/mssql-jdbc/releases/tag/v12.7.1
https://github.com/microsoft/mssql-jdbc/releases/tag/v12.8.0

Some fixed issues:

- Fix to ensure metadata returned follows JDBC data type specs microsoft/mssql-jdbc#2326
- Added token cache map to fix use of unintended auth token for subsequent connections microsoft/mssql-jdbc#2341
- Clear prepared statement handle before reconnect microsoft/mssql-jdbc#2364
- Reset socketTimeout to original value after a successful connection open microsoft/mssql-jdbc#2355
- Clear prepared statement cache when resetting statement pool connection microsoft/mssql-jdbc#2361
- Fixed ClassLoader leak of ActivityCorrelator ThreadLocal microsoft/mssql-jdbc#2366

### Does this PR introduce _any_ user-facing change?

No.
### How was this patch tested?

Pass GA.

### Was this patch authored or co-authored using generative AI tooling?

No.

Closes apache#47569 from wayneguow/ms_12_8.

Authored-by: Wei Guo <guow93@gmail.com>
Signed-off-by: Dongjoon Hyun <dhyun@apple.com>
  • Loading branch information
wayneguow authored and attilapiros committed Oct 4, 2024
1 parent 81267d7 commit 335bb89
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ package org.apache.spark.sql.jdbc

class MsSQLServerDatabaseOnDocker extends DatabaseOnDocker {
override val imageName = sys.env.getOrElse("MSSQLSERVER_DOCKER_IMAGE_NAME",
"mcr.microsoft.com/mssql/server:2022-CU12-GDR1-ubuntu-22.04")
"mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04")
override val env = Map(
"SA_PASSWORD" -> "Sapass123",
"ACCEPT_EULA" -> "Y"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ import org.apache.spark.sql.types.{BinaryType, DecimalType}
import org.apache.spark.tags.DockerTest

/**
* To run this test suite for a specific version (e.g., 2019-CU13-ubuntu-20.04):
* To run this test suite for a specific version (e.g., 2022-CU14-ubuntu-22.04):
* {{{
* ENABLE_DOCKER_INTEGRATION_TESTS=1
* MSSQLSERVER_DOCKER_IMAGE_NAME=mcr.microsoft.com/mssql/server:2019-CU13-ubuntu-20.04
* MSSQLSERVER_DOCKER_IMAGE_NAME=mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04
* ./build/sbt -Pdocker-integration-tests
* "docker-integration-tests/testOnly org.apache.spark.sql.jdbc.MsSqlServerIntegrationSuite"
* }}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ import org.apache.spark.sql.types._
import org.apache.spark.tags.DockerTest

/**
* To run this test suite for a specific version (e.g., 2019-CU13-ubuntu-20.04):
* To run this test suite for a specific version (e.g., 2022-CU14-ubuntu-22.04):
* {{{
* ENABLE_DOCKER_INTEGRATION_TESTS=1
* MSSQLSERVER_DOCKER_IMAGE_NAME=mcr.microsoft.com/mssql/server:2019-CU13-ubuntu-20.04
* MSSQLSERVER_DOCKER_IMAGE_NAME=mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04
* ./build/sbt -Pdocker-integration-tests "testOnly *v2*MsSqlServerIntegrationSuite"
* }}}
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import org.apache.spark.sql.util.CaseInsensitiveStringMap
import org.apache.spark.tags.DockerTest

/**
* To run this test suite for a specific version (e.g., 2019-CU13-ubuntu-20.04):
* To run this test suite for a specific version (e.g., 2022-CU14-ubuntu-22.04):
* {{{
* ENABLE_DOCKER_INTEGRATION_TESTS=1
* MSSQLSERVER_DOCKER_IMAGE_NAME=mcr.microsoft.com/mssql/server:2019-CU13-ubuntu-20.04
* MSSQLSERVER_DOCKER_IMAGE_NAME=mcr.microsoft.com/mssql/server:2022-CU14-ubuntu-22.04
* ./build/sbt -Pdocker-integration-tests "testOnly *v2.MsSqlServerNamespaceSuite"
* }}}
*/
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@
<mysql.connector.version>9.0.0</mysql.connector.version>
<postgresql.version>42.7.3</postgresql.version>
<db2.jcc.version>11.5.9.0</db2.jcc.version>
<mssql.jdbc.version>12.6.3.jre11</mssql.jdbc.version>
<mssql.jdbc.version>12.8.0.jre11</mssql.jdbc.version>
<ojdbc11.version>23.4.0.24.05</ojdbc11.version>
</properties>
<repositories>
Expand Down

0 comments on commit 335bb89

Please sign in to comment.