alekjarmov commented on code in PR #51616:
URL: https://github.com/apache/spark/pull/51616#discussion_r2221884640


##########
sql/core/src/test/scala/org/apache/spark/sql/jdbc/JDBCV2Suite.scala:
##########
@@ -164,33 +164,35 @@ class JDBCV2Suite extends QueryTest with 
SharedSparkSession with ExplainSuiteHel
       conn.prepareStatement(
         "CREATE TABLE \"test\".\"people\" (name TEXT(32) NOT NULL, id INTEGER 
NOT NULL)")
         .executeUpdate()
-      conn.prepareStatement("INSERT INTO \"test\".\"people\" VALUES ('fred', 
1)").executeUpdate()
-      conn.prepareStatement("INSERT INTO \"test\".\"people\" VALUES ('mary', 
2)").executeUpdate()
+
+      conn.prepareStatement("INSERT INTO \"test\".\"people\" VALUES " +
+        "('fred', 1), ('mary', 2)").executeUpdate()
+
       conn.prepareStatement(
         "CREATE TABLE \"test\".\"employee\" (dept INTEGER, name TEXT(32), 
salary NUMERIC(20, 2)," +
           " bonus DOUBLE, is_manager BOOLEAN)").executeUpdate()
-      conn.prepareStatement(
-        "INSERT INTO \"test\".\"employee\" VALUES (1, 'amy', 10000, 1000, 
true)").executeUpdate()
-      conn.prepareStatement(
-        "INSERT INTO \"test\".\"employee\" VALUES (2, 'alex', 12000, 1200, 
false)").executeUpdate()
-      conn.prepareStatement(
-        "INSERT INTO \"test\".\"employee\" VALUES (1, 'cathy', 9000, 1200, 
false)").executeUpdate()
-      conn.prepareStatement(
-        "INSERT INTO \"test\".\"employee\" VALUES (2, 'david', 10000, 1300, 
true)").executeUpdate()
-      conn.prepareStatement(
-        "INSERT INTO \"test\".\"employee\" VALUES (6, 'jen', 12000, 1200, 
true)").executeUpdate()
+
+      conn.prepareStatement("INSERT INTO \"test\".\"employee\" VALUES " +
+        "(1, 'amy', 10000, 1000, true), " +
+        "(2, 'alex', 12000, 1200, false), " +
+        "(1, 'cathy', 9000, 1200, false), " +
+        "(2, 'david', 10000, 1300, true), " +
+        "(6, 'jen', 12000, 1200, true)").executeUpdate()
+
       conn.prepareStatement(
         "CREATE TABLE \"test\".\"dept\" (\"dept id\" INTEGER NOT NULL, 
\"dept.id\" INTEGER)")
         .executeUpdate()
-      conn.prepareStatement("INSERT INTO \"test\".\"dept\" VALUES (1, 
1)").executeUpdate()
-      conn.prepareStatement("INSERT INTO \"test\".\"dept\" VALUES (2, 
1)").executeUpdate()
 
-      // scalastyle:off
-      conn.prepareStatement(
-        "CREATE TABLE \"test\".\"person\" (\"名\" INTEGER NOT 
NULL)").executeUpdate()
-      // scalastyle:on
-      conn.prepareStatement("INSERT INTO \"test\".\"person\" VALUES 
(1)").executeUpdate()
-      conn.prepareStatement("INSERT INTO \"test\".\"person\" VALUES 
(2)").executeUpdate()
+      conn.prepareStatement("INSERT INTO \"test\".\"dept\" VALUES " +
+        "(1, 1), (2, 1)").executeUpdate()
+
+      conn
+        .prepareStatement("CREATE TABLE \"test\".\"person\" (\"名\" INTEGER NOT 
NULL)")
+        .executeUpdate()
+
+      // Optimized: Batch insert for person table (was 2 separate INSERTs)

Review Comment:
   ```suggestion
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org

Reply via email to