Github user arina-ielchiieva commented on a diff in the pull request: https://github.com/apache/drill/pull/1033#discussion_r150512175 --- Diff: exec/java-exec/src/test/java/org/apache/drill/exec/sql/TestCTAS.java --- @@ -313,6 +313,59 @@ public void createTableWithCustomUmask() throws Exception { } } + @Test // DRILL-5951 + public void testCreateTableIfNotExistsWhenTableWithSameNameAlreadyExists() throws Exception{ + final String newTblName = "createTableIfNotExistsWhenATableWithSameNameAlreadyExists"; + + try { + test(String.format("CREATE TABLE %s.%s AS SELECT * from cp.`region.json`", TEMP_SCHEMA, newTblName)); --- End diff -- `test` method already contains `String.format`, you can use `test("CREATE TABLE %s.%s AS SELECT * from cp.`region.json`", TEMP_SCHEMA, newTblName)`
---