englefly commented on code in PR #20978:
URL: https://github.com/apache/doris/pull/20978#discussion_r1233951854
##########
fe/fe-core/src/main/java/org/apache/doris/statistics/Statistics.java:
##########
@@ -149,21 +155,28 @@ public Statistics merge(Statistics statistics) {
return this;
}
- private double computeTupleSize() {
+ private double computeTupleSize(Plan plan) {
if (tupleSize <= 0) {
- tupleSize = expressionToColumnStats.values().stream()
- .map(s -> s.avgSizeByte).reduce(0D, Double::sum);
+ tupleSize = 0;
+ for (Slot slot : plan.getOutput()) {
+ ColumnStatistic colStats = expressionToColumnStats.get(slot);
Review Comment:
yes,expressionToColumnStats.keySet() and plan.getOutput() are not match
--
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]