You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by "englefly (via GitHub)" <gi...@apache.org> on 2023/06/02 01:26:17 UTC

[GitHub] [doris] englefly commented on a diff in pull request #20341: [fix](nereids) fix bug: ColumnStatistics.avgSizeByte = 0

englefly commented on code in PR #20341:
URL: https://github.com/apache/doris/pull/20341#discussion_r1213824173


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculator.java:
##########
@@ -551,6 +551,11 @@ private Statistics computeScan(Scan scan) {
                 throw new RuntimeException(String.format("Invalid slot: %s", slotReference.getExprId()));
             }
             ColumnStatistic cache = Config.enable_stats ? getColumnStatistic(table, colName) : ColumnStatistic.UNKNOWN;
+            if (cache.avgSizeByte <= 0) {

Review Comment:
   The avgSizeByte means its size defined in schema. Even for UNKNOWN, its avgSizeByte is available.
   And this size is useful when we compute the cost of data transfer, given a schema defined size is better than Zero.



-- 
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-unsubscribe@doris.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org