terrymanu commented on a change in pull request #4477: Parse mysql variable
value for SET statement
URL:
https://github.com/apache/incubator-shardingsphere/pull/4477#discussion_r386310749
##########
File path:
shardingsphere-sql-parser/shardingsphere-sql-parser-postgresql/src/main/java/org/apache/shardingsphere/sql/parser/visitor/impl/PostgreSQLDALVisitor.java
##########
@@ -33,26 +42,50 @@
* DAL visitor for PostgreSQL.
*/
public final class PostgreSQLDALVisitor extends PostgreSQLVisitor implements
DALVisitor {
-
+
@Override
public ASTNode visitShow(final ShowContext ctx) {
return new ShowStatement();
}
-
+
@Override
- public ASTNode visitSet(final SetContext ctx) {
+ public ASTNode visitSetVariable(final SetVariableContext ctx) {
SetStatement result = new SetStatement();
- if (null != ctx.configurationParameterClause()) {
- result.setVariable((VariableSegment)
visit(ctx.configurationParameterClause()));
+ if (null != ctx.variableExpr()) {
+ List<VariableExpr> variableExprList = new
ArrayList<VariableExpr>(1);
Review comment:
Use `Collections.singletionList(xxx)` is better
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services