You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SPARK-48172][SQL][FOLLOWUP] Fix escaping issues in JDBCDialects
### What changes were proposed in this pull request?
Removal of stripMargin from the code in `DockerJDBCIntegrationV2Suite`.
### Why are the changes needed?
#46588
Given PR was merged to master/3.5/3.4. This PR broke daily jobs for `OracleIntegrationSuite`. Upon inspection, it was noted that 3.4 and 3.5 are run with JDK8 while master is run with JDK21 and stripMargin was behaving differently in those cases. Upon removing stripMargin and spliting `INSERT INTO` statements into multiple lines, all integration tests have passed.
### Does this PR introduce _any_ user-facing change?
No, only loading of the test data was changed to follow language requirements.
### How was this patch tested?
Existing suite was aborted in the job and now it is running.
### Was this patch authored or co-authored using generative AI tooling?
No
Closes#46806Closes#46807 from mihailom-db/FixOracleMaster.
Authored-by: Mihailo Milosevic <[email protected]>
Signed-off-by: Kent Yao <[email protected]>
Copy file name to clipboardExpand all lines: connector/docker-integration-tests/src/test/scala/org/apache/spark/sql/jdbc/v2/DockerJDBCIntegrationV2Suite.scala
+18-10Lines changed: 18 additions & 10 deletions
Original file line number
Diff line number
Diff line change
@@ -39,16 +39,24 @@ abstract class DockerJDBCIntegrationV2Suite extends DockerJDBCIntegrationSuite {
39
39
connection.prepareStatement("INSERT INTO employee VALUES (6, 'jen', 12000, 1200)")
40
40
.executeUpdate()
41
41
42
-
connection.prepareStatement(
43
-
s"""
44
-
|INSERT INTO pattern_testing_table VALUES
45
-
|('special_character_quote''_present'),
46
-
|('special_character_quote_not_present'),
47
-
|('special_character_percent%_present'),
48
-
|('special_character_percent_not_present'),
49
-
|('special_character_underscore_present'),
50
-
|('special_character_underscorenot_present')
51
-
""".stripMargin).executeUpdate()
42
+
connection.prepareStatement("INSERT INTO pattern_testing_table "
43
+
+"VALUES ('special_character_quote''_present')")
44
+
.executeUpdate()
45
+
connection.prepareStatement("INSERT INTO pattern_testing_table "
0 commit comments