@@ -1787,7 +1787,7 @@ void testDateWithAndWithoutCalendar() throws Exception {
17871787 }
17881788
17891789 @ Test (groups = {"integration" })
1790- public void testUnknownStatementTest () throws Exception {
1790+ public void testUnknownStatement () throws Exception {
17911791 try (Connection conn = getJdbcConnection ()) {
17921792 try (PreparedStatement stmt = conn .prepareStatement ("SELECT number, FROM system.numbers LIMIT 3" )) {
17931793 Assert .assertTrue (stmt .execute ());
@@ -1815,7 +1815,7 @@ public void testUnknownStatementTest() throws Exception {
18151815 String tmpTable = "tmp_no_result_" + RandomStringUtils .randomAlphanumeric (8 );
18161816 // PreparedStatement: execute() should return false, executeQuery() should throw
18171817 try (PreparedStatement stmt = conn .prepareStatement (
1818- "CREATE TEMPORARY TABLE " + tmpTable + " (x Int32)" )) {
1818+ "CREATE TABLE " + tmpTable + " (x Int32) Engine MergeTree ORDER BY( )" )) {
18191819 Assert .assertFalse (stmt .execute (), "DDL should not produce a ResultSet" );
18201820 Assert .assertNull (stmt .getResultSet (), "ResultSet should be null for DDL" );
18211821 assertThrows (SQLException .class , stmt ::executeQuery );
@@ -1824,11 +1824,11 @@ public void testUnknownStatementTest() throws Exception {
18241824 String tmpTable2 = "tmp_no_result_" + RandomStringUtils .randomAlphanumeric (8 );
18251825 try (Statement stmt = conn .createStatement ()) {
18261826 Assert .assertFalse (
1827- stmt .execute ("CREATE TEMPORARY TABLE " + tmpTable2 + " (x Int32)" ),
1827+ stmt .execute ("CREATE TABLE " + tmpTable2 + " (x Int32) Engine MergeTree ORDER BY( )" ),
18281828 "DDL should not produce a ResultSet" );
18291829 Assert .assertNull (stmt .getResultSet (), "ResultSet should be null for DDL" );
18301830 assertThrows (SQLException .class ,
1831- () -> stmt .executeQuery ("CREATE TEMPORARY TABLE " + tmpTable2 + " (x Int32)" ));
1831+ () -> stmt .executeQuery ("CREATE TABLE " + tmpTable2 + " (x Int32) Engine MergeTree ORDER BY( )" ));
18321832 }
18331833 }
18341834 }
0 commit comments