try (Statement s = connection.createStatement()) {
try {
s.executeUpdate("create table t (i int, j int, primary key (i)) engine = MergeTree()");
s.executeUpdate("alter table t alter column j default 1");
}
finally {
s.executeUpdate("drop table if exists t");
}
}
12:35:58,252 WARN [SqlParser ] - SQL syntax error at line: 1, pos: 14, mismatched input 'alter' expecting {ADD, ATTACH, CLEAR, COMMENT, DELETE, DETACH, DROP, FREEZE, MATERIALIZE, MODIFY, MOVE, ON, REMOVE, RENAME, REPLACE, UPDATE}
Steps to reproduce
The syntax is perfectly fine:
Error Log or Exception StackTrace
Expected Behaviour
No log entries
Configuration
Environment
com.clickhouse:clickhouse-jdbc:0.9.2ClickHouse Server