From d54453ee8a8e04256d2cd85b83f845b352e7caf9 Mon Sep 17 00:00:00 2001 From: Mihailo Milosevic Date: Thu, 30 May 2024 09:51:01 +0200 Subject: [PATCH 1/3] Fix OracleIntegrationSuite for JDK8 --- .../org/apache/spark/sql/jdbc/v2/OracleIntegrationSuite.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/OracleIntegrationSuite.scala b/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/OracleIntegrationSuite.scala index 342fb4bb38e6..50dc9e60e254 100644 --- a/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/OracleIntegrationSuite.scala +++ b/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/OracleIntegrationSuite.scala @@ -95,7 +95,7 @@ class OracleIntegrationSuite extends DockerJDBCIntegrationV2Suite with V2JDBCTes " bonus BINARY_DOUBLE)").executeUpdate() connection.prepareStatement( s"""CREATE TABLE pattern_testing_table ( - |pattern_testing_col VARCHAR(50) + |pattern_testing_col VARCHAR2(50) |) """.stripMargin ).executeUpdate() From 7d00764729e8c006d7c0948a7241d051f7ed5c0d Mon Sep 17 00:00:00 2001 From: Mihailo Milosevic Date: Thu, 30 May 2024 10:07:38 +0200 Subject: [PATCH 2/3] Revert "Fix OracleIntegrationSuite for JDK8" This reverts commit d54453ee8a8e04256d2cd85b83f845b352e7caf9. --- .../org/apache/spark/sql/jdbc/v2/OracleIntegrationSuite.scala | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/OracleIntegrationSuite.scala b/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/OracleIntegrationSuite.scala index 50dc9e60e254..342fb4bb38e6 100644 --- a/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/OracleIntegrationSuite.scala +++ b/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/OracleIntegrationSuite.scala @@ -95,7 +95,7 @@ class OracleIntegrationSuite extends DockerJDBCIntegrationV2Suite with V2JDBCTes " bonus BINARY_DOUBLE)").executeUpdate() connection.prepareStatement( s"""CREATE TABLE pattern_testing_table ( - |pattern_testing_col VARCHAR2(50) + |pattern_testing_col VARCHAR(50) |) """.stripMargin ).executeUpdate() From 9fd1873c921c419794e03dec0a847487aab4ac43 Mon Sep 17 00:00:00 2001 From: Mihailo Milosevic Date: Thu, 30 May 2024 15:00:35 +0200 Subject: [PATCH 3/3] Fix oracle integration test --- .../v2/DockerJDBCIntegrationV2Suite.scala | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/DockerJDBCIntegrationV2Suite.scala b/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/DockerJDBCIntegrationV2Suite.scala index 5f4f0b7a3afb..60345257f2dc 100644 --- a/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/DockerJDBCIntegrationV2Suite.scala +++ b/connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/DockerJDBCIntegrationV2Suite.scala @@ -39,16 +39,24 @@ abstract class DockerJDBCIntegrationV2Suite extends DockerJDBCIntegrationSuite { connection.prepareStatement("INSERT INTO employee VALUES (6, 'jen', 12000, 1200)") .executeUpdate() - connection.prepareStatement( - s""" - |INSERT INTO pattern_testing_table VALUES - |('special_character_quote''_present'), - |('special_character_quote_not_present'), - |('special_character_percent%_present'), - |('special_character_percent_not_present'), - |('special_character_underscore_present'), - |('special_character_underscorenot_present') - """.stripMargin).executeUpdate() + connection.prepareStatement("INSERT INTO pattern_testing_table " + + "VALUES ('special_character_quote''_present')") + .executeUpdate() + connection.prepareStatement("INSERT INTO pattern_testing_table " + + "VALUES ('special_character_quote_not_present')") + .executeUpdate() + connection.prepareStatement("INSERT INTO pattern_testing_table " + + "VALUES ('special_character_percent%_present')") + .executeUpdate() + connection.prepareStatement("INSERT INTO pattern_testing_table " + + "VALUES ('special_character_percent_not_present')") + .executeUpdate() + connection.prepareStatement("INSERT INTO pattern_testing_table " + + "VALUES ('special_character_underscore_present')") + .executeUpdate() + connection.prepareStatement("INSERT INTO pattern_testing_table " + + "VALUES ('special_character_underscorenot_present')") + .executeUpdate() } def tablePreparation(connection: Connection): Unit