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

##########
fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatistic.java:
##########
@@ -138,7 +175,8 @@ public static ColumnStatistic fromResultRow(ResultRow 
resultRow) {
             columnStatisticBuilder.setNumNulls(Double.parseDouble(nullCount));
             columnStatisticBuilder.setDataSize(Double
                     
.parseDouble(resultRow.getColumnValueWithDefault("data_size_in_bytes", "0")));
-            
columnStatisticBuilder.setAvgSizeByte(columnStatisticBuilder.getDataSize()
+            
columnStatisticBuilder.setAvgSizeByte(columnStatisticBuilder.getCount() == 0
+                    ? 0 : columnStatisticBuilder.getDataSize()
                     / columnStatisticBuilder.getCount());

Review Comment:
   if we do not have schema info, leave it -1, and we could make up avgSize at 
computeScan().



-- 
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

Reply via email to