Merge pull request #7956 from dataease/pr@dev-v2@refactor_new_func

refactor: 使用Calcite新方法替换过时方法
This commit is contained in:
Junjun 2024-02-01 11:38:40 +08:00 committed by GitHub
commit 5dfce7afa0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 8 deletions

View File

@ -43,10 +43,9 @@ public class SqlparserUtils {
}
SqlParser.Config config =
SqlParser.configBuilder()
.setLex(Lex.JAVA)
.setIdentifierMaxLength(256)
.build();
SqlParser.config()
.withLex(Lex.JAVA)
.withIdentifierMaxLength(256);
SqlParser sqlParser = SqlParser.create(tmpSql, config);
SqlNode sqlNode;
try {

View File

@ -21,10 +21,9 @@ public class SqlUtils {
}
SqlParser.Config config =
SqlParser.configBuilder()
.setLex(Lex.JAVA)
.setIdentifierMaxLength(256)
.build();
SqlParser.config()
.withLex(Lex.JAVA)
.withIdentifierMaxLength(256);
// 创建解析器
SqlParser sqlParser = SqlParser
.create(sql, config);