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


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/ColumnStatistic.java:
##########
@@ -395,4 +413,33 @@ public static ColumnStatistic 
createUnknownByDataType(DataType dataType) {
                     .build();
         }
     }
+
+    /**
+     * Get the map of column value and its row count percentage in the table.
+     * The hotValue is like:
+     * value1:percent1;value2:percent2;value3:percent3
+     * We only return the column value whose percentage is larger than 30%.
+     * @return Map of value -> percentage.
+     */
+    public Map<String, Float> getHotValues() {
+        if (hotValue == null || hotValue.isEmpty()) {

Review Comment:
   replace String key by literal key, please
   Maybe we should cache this map for performance reason



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/ShowColumnStatsStmt.java:
##########
@@ -72,6 +72,7 @@ public class ShowColumnStatsStmt extends ShowStmt implements 
NotFallbackInParser
                     .add("update_rows")
                     .add("last_analyze_row_count")
                     .add("last_analyze_version")
+                    .add("hot_value")

Review Comment:
   hot_value->hot_values



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

Reply via email to