You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/12/23 11:24:18 UTC

[GitHub] [shardingsphere] terrymanu commented on a change in pull request #8731: format code for pr#8665

terrymanu commented on a change in pull request #8731:
URL: https://github.com/apache/shardingsphere/pull/8731#discussion_r547910996



##########
File path: shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/MySQLSQLStatVisitor.java
##########
@@ -101,14 +101,14 @@ private ColumnSegment getColumn(final ColumnRefContext ctx) {
         } else {
             name = new IdentifierValue(ctx.identifier(0).getText());
         }
-        ColumnSegment column = new ColumnSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), name);
-        column.setOwner(owner);
-        return column;
+        ColumnSegment result = new ColumnSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), name);
+        result.setOwner(owner);
+        return result;
     }
 
     private ColumnSegment getColumn(final IdentifierContext ctx) {
-        ColumnSegment column = new ColumnSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), new IdentifierValue(ctx.getText()));
-        return column;
+        ColumnSegment result = new ColumnSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), new IdentifierValue(ctx.getText()));

Review comment:
       Should inline variable, just return the expression




----------------------------------------------------------------
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:
users@infra.apache.org