vlsi commented on a change in pull request #2369:
URL: https://github.com/apache/calcite/pull/2369#discussion_r593131391



##########
File path: server/src/test/java/org/apache/calcite/test/ServerTest.java
##########
@@ -207,6 +215,12 @@ static Connection connect() throws SQLException {
       assertThat(b, is(false));
       x = s.executeUpdate("insert into t2 values (1, NULL)");
       assertThat(x, is(1));
+
+      // REPLACE must re-create the table, which we verify through the
+      // subsequent INSERT command, which expects only one column in the table.
+      s.execute("create or replace table t2 (i int not null)");
+      x = s.executeUpdate("insert into t2 values (1)");
+      assertThat(x, is(1));

Review comment:
       ```suggestion
         assertDoesNotThrow(() -> {
           s.execute("create or replace table t2 (i int not null)");
           s.executeUpdate("insert into t2 values (1)");
         }, "test table t2 should have been successfully recreated with one 
column, and insert values(1) should pass");
   ```
   




----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to