strongduanmu commented on a change in pull request #11394:
URL: https://github.com/apache/shardingsphere/pull/11394#discussion_r672744369



##########
File path: 
shardingsphere-sql-parser/shardingsphere-sql-parser-dialect/shardingsphere-sql-parser-mysql/src/main/java/org/apache/shardingsphere/sql/parser/mysql/visitor/statement/impl/MySQLStatementSQLVisitor.java
##########
@@ -1254,13 +1254,13 @@ private ASTNode createProjection(final 
ProjectionContext ctx, final AliasSegment
         }
         if (projection instanceof CommonExpressionSegment) {
             CommonExpressionSegment segment = (CommonExpressionSegment) 
projection;
-            ExpressionProjectionSegment result = new 
ExpressionProjectionSegment(segment.getStartIndex(), segment.getStopIndex(), 
segment.getText());
+            ExpressionProjectionSegment result = new 
ExpressionProjectionSegment(segment.getStartIndex(), segment.getStopIndex(), 
segment.getText(), segment);
             result.setAlias(alias);
             return result;
         }
         // FIXME :For DISTINCT()
         if (projection instanceof ColumnSegment) {
-            ExpressionProjectionSegment result = new 
ExpressionProjectionSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), 
ctx.getText());
+            ExpressionProjectionSegment result = new 
ExpressionProjectionSegment(ctx.start.getStartIndex(), ctx.stop.getStopIndex(), 
ctx.getText(), (ExpressionSegment) projection);

Review comment:
       @tuichenchuxin Please cast project to ColumnSegment.




-- 
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: notifications-unsubscr...@shardingsphere.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to