morningman commented on code in PR #8919:
URL: https://github.com/apache/incubator-doris/pull/8919#discussion_r846254884
##########
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:
Maybe we should throw `NotImplementedException` here?
So that we can ensure that every newly added Expr subclass will override
this method?
--
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]