xsong123 edited a comment on issue #13747:
URL: 
https://github.com/apache/shardingsphere/issues/13747#issuecomment-976242209


   override method getText() in class[ExpressionOrderByItemSegment] 
   
   
   
   package 
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.order.item;
   
   import lombok.Generated;
   import 
org.apache.shardingsphere.sql.parser.sql.common.constant.OrderDirection;
   import 
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.ExpressionSegment;
   import 
org.apache.shardingsphere.sql.parser.sql.common.segment.dml.expr.complex.CommonExpressionSegment;
   
   public final class ExpressionOrderByItemSegment extends 
TextOrderByItemSegment {
       private final String expression;
       private final ExpressionSegment expr;
   
       public ExpressionOrderByItemSegment(int startIndex, int stopIndex, 
String expression, OrderDirection orderDirection, OrderDirection 
nullOrderDirection) {
           super(startIndex, stopIndex, orderDirection, nullOrderDirection);
           this.expression = expression;
           this.expr = null;
       }
   
       public ExpressionOrderByItemSegment(int startIndex, int stopIndex, 
String expression, OrderDirection orderDirection) {
           super(startIndex, stopIndex, orderDirection, OrderDirection.ASC);
           this.expression = expression;
           this.expr = null;
       }
   
       public ExpressionOrderByItemSegment(int startIndex, int stopIndex, 
String expression, OrderDirection orderDirection, ExpressionSegment expr) {
           super(startIndex, stopIndex, orderDirection, OrderDirection.ASC);
           this.expression = expression;
           this.expr = expr;
       }
   
       public String getText() {
           //return this.expression;
           return ((CommonExpressionSegment)this.expr).getText();
       }
   
       @Generated
       public String getExpression() {
           return this.expression;
       }
   
       @Generated
       public ExpressionSegment getExpr() {
           return this.expr;
       }
   
       @Generated
       public String toString() {
           return "ExpressionOrderByItemSegment(super=" + super.toString() + ", 
expression=" + this.getExpression() + ", expr=" + this.getExpr() + ")";
       }
   }
   


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