morningman commented on code in PR #8919:
URL: https://github.com/apache/incubator-doris/pull/8919#discussion_r849388957
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticExpr.java:
##########
@@ -831,6 +831,36 @@ public String toSqlImpl() {
return sb.toString();
}
+ @Override
+ public String toDigestImpl() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(fnCall.toDigest()).append(" OVER (");
Review Comment:
And I'm not quite sure about the performance impact of this implementation.
Looks like these are too much string operations.
Have you test its performance? Especially in high concurrency senario.
And I found some reference about how to implement digest or fingerprint of a
SQL:
https://segmentfault.com/a/1190000040132966
##########
fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticExpr.java:
##########
@@ -831,6 +831,36 @@ public String toSqlImpl() {
return sb.toString();
}
+ @Override
+ public String toDigestImpl() {
+ StringBuilder sb = new StringBuilder();
+ sb.append(fnCall.toDigest()).append(" OVER (");
Review Comment:
I think we don't need those `OVER` or `PARTITION BY` keywords in digest?
maybe just a prefix like `AnalyticExpr` is enough.
--
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]