kviuff commented on issue #14960:
URL: https://github.com/apache/druid/issues/14960#issuecomment-1713255050

   代码:
   StringBuffer sqlBuffer = new StringBuffer();
           sqlBuffer.append("/*查询语句第一行*/");
           sqlBuffer.append("SELECT person.id,person.name,group.name  FROM 
person JOIN group ON person.group_id = group.id WHERE person.birthdat > 
'1980-01-01';");
           sqlBuffer.append("/*查询语句1111*/");
           sqlBuffer.append("SELECT person.id,person.name,group.name  FROM 
person JOIN group ON person.group_id = group.id WHERE person.birthdat > 
'1980-01-01'");
           // sqlBuffer.append("SELECT * from aaa");
   
           List<SQLStatement> statementList = null;
           SQLStatementParser sqlStatementParser = 
SQLParserUtils.createSQLStatementParser(sqlBuffer.toString(), 
DbType.postgresql, true);
           statementList = sqlStatementParser.parseStatementList();
           String sqlResult = toSQLString(statementList, DbType.postgresql);
           System.out.println("格式化SQL:\n" + sqlResult);


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to