Github user HyukjinKwon commented on a diff in the pull request:

    https://github.com/apache/spark/pull/22399#discussion_r216928976
  
    --- Diff: core/src/test/java/org/apache/spark/JavaJdbcRDDSuite.java ---
    @@ -39,30 +39,27 @@ public void setUp() throws ClassNotFoundException, 
SQLException {
         sc = new JavaSparkContext("local", "JavaAPISuite");
     
         Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
    -    Connection connection =
    -      
DriverManager.getConnection("jdbc:derby:target/JavaJdbcRDDSuiteDb;create=true");
     
    -    try {
    -      Statement create = connection.createStatement();
    -      create.execute(
    -        "CREATE TABLE FOO(" +
    -        "ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY (START WITH 1, 
INCREMENT BY 1)," +
    -        "DATA INTEGER)");
    -      create.close();
    +    try (Connection connection = 
DriverManager.getConnection("jdbc:derby:target/JavaJdbcRDDSuiteDb;create=true"))
 {
    +
    +      try(Statement create = connection.createStatement()) {
    +        create.execute(
    +                "CREATE TABLE FOO(" +
    +                        "ID INTEGER NOT NULL GENERATED ALWAYS AS IDENTITY 
(START WITH 1, INCREMENT BY 1)," +
    +                        "DATA INTEGER)");
    --- End diff --
    
    indentation ..


---

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

Reply via email to