Henry2SS commented on code in PR #8919:
URL: https://github.com/apache/incubator-doris/pull/8919#discussion_r847072683


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/Expr.java:
##########
@@ -871,12 +871,20 @@ public String toSql() {
         return (printSqlInParens) ? "(" + toSqlImpl() + ")" : toSqlImpl();
     }
 
+    public String toDigest() {
+        return (printSqlInParens) ? "(" + toDigestImpl() + ")" : 
toDigestImpl();
+    }
+
     /**
      * Returns a SQL string representing this expr. Subclasses should override 
this method
      * instead of toSql() to ensure that parenthesis are properly added around 
the toSql().
      */
     protected abstract String toSqlImpl();
 
+    protected String toDigestImpl() {
+        return toSqlImpl();

Review Comment:
   Thx for your reply.
   The abstract method `toSqlImpl()` will be overrided in each subclass. So 
there is no need to throw out exceptions.
   The only situation is that a newly added subclass, which its sql digest 
needs to be different from sql impl, should override this method.
   
   Added comments over this method to remind developers.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to