strongduanmu commented on code in PR #25268:
URL: https://github.com/apache/shardingsphere/pull/25268#discussion_r1174559029


##########
sql-parser/dialect/mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/MySQLStatementVisitor.java:
##########
@@ -939,8 +946,13 @@ public final ASTNode visitPositionFunction(final 
PositionFunctionContext ctx) {
     
     @Override
     public final ASTNode visitSubstringFunction(final SubstringFunctionContext 
ctx) {
-        calculateParameterCount(Collections.singleton(ctx.expr()));
-        return new FunctionSegment(ctx.getStart().getStartIndex(), 
ctx.getStop().getStopIndex(), null == ctx.SUBSTR() ? ctx.SUBSTRING().getText() 
: ctx.SUBSTR().getText(), getOriginalText(ctx));
+        FunctionSegment result = new FunctionSegment(
+                ctx.getStart().getStartIndex(), ctx.getStop().getStopIndex(), 
null == ctx.SUBSTR() ? ctx.SUBSTRING().getText() : ctx.SUBSTR().getText(), 
getOriginalText(ctx));
+        result.getParameters().add((ExpressionSegment) visit(ctx.expr()));
+        for (TerminalNode node : ctx.NUMBER_()) {

Review Comment:
   Please rename node to each.



-- 
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]

Reply via email to