We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
druid版本:1.2.11 原始sql:SELECT people.* FROM t1, JSON_TABLE(json_col, '$.people[*]' COLUMNS ( name VARCHAR(40) PATH '$.name', address VARCHAR(100) PATH '$.address') ) people; 问题代码:com.alibaba.druid.sql.dialect.mysql.ast.expr.MySqlJSONTableExpr 的 toString()
问题描述:想通过druid解析sql代码实例如下: SQLStatementParser parser = SQLParserUtils.createSQLStatementParser(sql, dbType); final List<SQLStatement> sqlStatements = parser.parseStatementList();
SQLStatementParser parser = SQLParserUtils.createSQLStatementParser(sql, dbType); final List<SQLStatement> sqlStatements = parser.parseStatementList();
发现当sql中含有 JSON_TABLE 会导致解析后的sql缺少一个逗号,执行时直接抛异常。
The text was updated successfully, but these errors were encountered:
怀疑问题出现在 com.alibaba.druid.sql.dialect.mysql.visitor.MySqlOutputVisitor#visit(com.alibaba.druid.sql.dialect.mysql.ast.expr.MySqlJSONTableExpr)
Sorry, something went wrong.
修改代码以后输出正确
https://github.com/alibaba/druid/releases/tag/1.2.12 druid-1.2.12版本已发布,请帮忙用新版本验证
No branches or pull requests
druid版本:1.2.11
原始sql:SELECT people.*
FROM t1,
JSON_TABLE(json_col, '$.people[*]' COLUMNS (
name VARCHAR(40) PATH '$.name',
address VARCHAR(100) PATH '$.address')
) people;
问题代码:com.alibaba.druid.sql.dialect.mysql.ast.expr.MySqlJSONTableExpr 的 toString()
问题描述:想通过druid解析sql代码实例如下:
SQLStatementParser parser = SQLParserUtils.createSQLStatementParser(sql, dbType); final List<SQLStatement> sqlStatements = parser.parseStatementList();
发现当sql中含有 JSON_TABLE 会导致解析后的sql缺少一个逗号,执行时直接抛异常。
The text was updated successfully, but these errors were encountered: