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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org