Skip to content

Commit 05a9258

Browse files
committed
remove duplicate test from statement tests - conflicting with same test in prepared statement
1 parent 39a87e4 commit 05a9258

File tree

2 files changed

+1
-25
lines changed

2 files changed

+1
-25
lines changed

jdbc-v2/src/main/java/com/clickhouse/jdbc/StatementImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ protected int executeUpdateImpl(String sql, QuerySettings settings) throws SQLEx
181181
lastStatementSql = parseJdbcEscapeSyntax(sql);
182182
LOG.trace("SQL Query: {}", lastStatementSql);
183183
int updateCount = 0;
184+
System.out.println(lastStatementSql);
184185
try (QueryResponse response = queryTimeout == 0 ? connection.client.query(lastStatementSql, mergedSettings).get()
185186
: connection.client.query(lastStatementSql, mergedSettings).get(queryTimeout, TimeUnit.SECONDS)) {
186187
currentResultSet = null;

jdbc-v2/src/test/java/com/clickhouse/jdbc/StatementTest.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -731,29 +731,4 @@ public void testDDLStatements() throws Exception {
731731
}
732732
}
733733
}
734-
735-
@Test(groups = {"integration"})
736-
public void testSelectWithKeywordsAsTableAlias() throws Exception {
737-
String[] keywords = {
738-
"ALL", "AND", "ANY", "AS", "ASC", "BY", "CREATE", "DATABASE", "DELETE", "DESC", "DISTINCT", "DROP", "EXISTS", "FROM", "GRANT", "GROUP", "HAVING", "INSERT", "INTO", "LIMIT", "NOT", "NULL", "ON", "ORDER", "REVOKE", "SELECT", "SET", "TABLE", "TO", "UPDATE", "VALUES", "VIEW", "WHILE", "WITH", "WHERE"
739-
};
740-
741-
try (Connection conn = getJdbcConnection()) {
742-
for (String keyword : keywords) {
743-
String createSql = "CREATE TABLE IF NOT EXISTS " + getDatabase() + "." + keyword + "(id UInt8) ENGINE = MergeTree ORDER BY id";
744-
String insertSql = "INSERT INTO " + getDatabase() + "." + keyword + " VALUES (1)";
745-
String selectSql = "SELECT * FROM " + getDatabase() + "." + keyword + " AS " + keyword;
746-
try (Statement stmt = conn.createStatement()) {
747-
Assert.assertFalse(stmt.execute(createSql));
748-
Assert.assertFalse(stmt.execute(insertSql));
749-
try (ResultSet rs = stmt.executeQuery(selectSql)) {
750-
Assert.assertTrue(rs.next());
751-
Assert.assertEquals(rs.getInt(1), 1);
752-
}
753-
} catch (Exception e) {
754-
fail("failed for keyword: " + keyword, e);
755-
}
756-
}
757-
}
758-
}
759734
}

0 commit comments

Comments
 (0)