Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

StatFilter没有适配gaussdb导致sql打印异常 #5845

Closed
zhang1001san opened this issue Apr 15, 2024 · 1 comment
Closed

StatFilter没有适配gaussdb导致sql打印异常 #5845

zhang1001san opened this issue Apr 15, 2024 · 1 comment

Comments

@zhang1001san
Copy link

zhang1001san commented Apr 15, 2024

你好。

1问题:StatFilter没有适配gaussdb导致sql打印异常
2. 异常sql : delete from xx表 t where t.id=1
3.异常代码处(StatFilter.java):
` public String mergeSql(String sql, DbType dbType) {

    try {
        sql = ParameterizedOutputVisitorUtils.parameterize(sql, dbType, null, null, null);
    } catch (Exception e) {
        LOG.error("merge sql error, dbType " + dbType + ", druid-" + VERSION.getVersionNumber() + ", sql : " + sql, e);
    }

    return sql;
}`

4.错误原因:
SQLParserUtils.createSQLStatementParser方法并没有适配gaussdb。
gaussdb 应该也是使用PGSQLStatementParser把?(如下)
case postgresql: case greenplum: case edb: eturn new PGSQLStatementParser(sql, features);

lizongbo added a commit to lizongbo/druid that referenced this issue Apr 16, 2024
lizongbo added a commit that referenced this issue Apr 16, 2024
优化适配 适配gaussdb #5845
@lizongbo
Copy link
Collaborator

加上适配了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants