Skip to content

Commit

Permalink
解决导致clickhouse其它alter语句解析失败的问题#5307
Browse files Browse the repository at this point in the history
也解决单元测试在windows下读入换行符不一致导致的断言出错问题
  • Loading branch information
lizongbo authored and wenshao committed Jun 15, 2023
1 parent 351e54a commit 4b70707
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,9 @@ public SQLStatement parseAlter() {
stmt.setWhere(this.exprParser.expr());
}
return stmt;
} else {
lexer.reset(mark);
return super.parseAlter();
}
}
throw new ParserException("TODO " + lexer.info());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ public void exec_test(String resource) throws Exception {
JdbcUtils.close(reader);
String[] items = input.split("---------------------------");
String sql = items[0].trim();
String expect = items.length > 1 ? items[1].trim() : null;
String expect = items.length > 1 ? items[1].trim().replace("\r\n","\n") : null;

List<SQLStatement> statementList = SQLUtils.parseStatements(sql, DbType.clickhouse);

Expand Down

0 comments on commit 4b70707

Please sign in to comment.