Skip to content

Commit c999bfc

Browse files
authored
Merge pull request #2481 from ClickHouse/fix_build_07_01_25
fix build
2 parents a9157f6 + 05a9258 commit c999bfc

File tree

2 files changed

+2
-23
lines changed

2 files changed

+2
-23
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: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import static org.testng.Assert.assertNull;
3131
import static org.testng.Assert.assertThrows;
3232
import static org.testng.Assert.assertTrue;
33+
import static org.testng.Assert.fail;
3334

3435

3536
@Test(groups = { "integration" })
@@ -730,27 +731,4 @@ public void testDDLStatements() throws Exception {
730731
}
731732
}
732733
}
733-
734-
@Test(groups = {"integration"})
735-
public void testSelectWithKeywordsAsTableAlias() throws Exception {
736-
String[] keywords = {
737-
"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"
738-
};
739-
740-
try (Connection conn = getJdbcConnection()) {
741-
for (String keyword : keywords) {
742-
String createSql = "CREATE TABLE IF NOT EXISTS " + getDatabase() + "." + keyword + "(id UInt8) ENGINE = MergeTree ORDER BY id";
743-
String insertSql = "INSERT INTO " + getDatabase() + "." + keyword + " VALUES (1)";
744-
String selectSql = "SELECT * FROM " + getDatabase() + "." + keyword + " AS " + keyword;
745-
try (Statement stmt = conn.createStatement()) {
746-
Assert.assertFalse(stmt.execute(createSql));
747-
Assert.assertFalse(stmt.execute(insertSql));
748-
try (ResultSet rs = stmt.executeQuery(selectSql)) {
749-
Assert.assertTrue(rs.next());
750-
Assert.assertEquals(rs.getInt(1), 1);
751-
}
752-
}
753-
}
754-
}
755-
}
756734
}

0 commit comments

Comments
 (0)