Details
Description
Here are the sqls:
// like statement select id,name from chener where name like 'name' //limit statement select id,name from chener where name = 'jack' limit 1
than the parser code:
// the java code for parser
SqlParser.Config mysqlConfig = SqlParser.configBuilder()
.setParserFactory(SqlAlterParserImpl.FACTORY)
.setLex(Lex.MYSQL)
.build();
SqlParser parser = SqlParser.create("", mysqlConfig);
SqlNode sqlNode = parser.parseQuery(likeSql);
SqlNode sqlNode1 = parser.parseQuery(limitSql);
the like statement result:
You can see that the SqlParserPos of the like statement in where seems wrong.If the where statement does not contain the like statement,it works allright. And so does the limit stament.