ajantha-bhat commented on code in PR #10111: URL: https://github.com/apache/iceberg/pull/10111#discussion_r1559369352
########## core/src/test/java/org/apache/iceberg/jdbc/TestJdbcUtil.java: ########## @@ -45,4 +51,97 @@ public void testFilterAndRemovePrefix() { assertThat(expected).isEqualTo(actual); } + + @Test + public void testV0toV1SqlStatements() throws Exception { + java.nio.file.Path dbFile = Files.createTempFile("icebergSchemaUpdate", "db"); + String jdbcUrl = "jdbc:sqlite:" + dbFile.toAbsolutePath(); + + SQLiteDataSource dataSource = new SQLiteDataSource(); + dataSource.setUrl(jdbcUrl); + + try (JdbcClientPool connections = new JdbcClientPool(jdbcUrl, Maps.newHashMap())) { + // create "old style" SQL schema + connections.newClient().prepareStatement(JdbcUtil.V0_CREATE_CATALOG_SQL).executeUpdate(); + + // inserting tables + JdbcUtil.doCommitCreateTable( + JdbcUtil.SchemaVersion.V0, + connections, + "TEST", + Namespace.of("namespace1"), + TableIdentifier.of(Namespace.of("namespace1"), "table1"), + "testLocation"); + JdbcUtil.doCommitCreateTable( Review Comment: yeah -- 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: issues-unsubscr...@iceberg.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org For additional commands, e-mail: issues-h...@iceberg.apache.org