Jibing-Li commented on code in PR #35517: URL: https://github.com/apache/doris/pull/35517#discussion_r1617289871
########## fe/fe-core/src/main/java/org/apache/doris/analysis/ShowColumnStatsStmt.java: ########## @@ -225,6 +228,32 @@ public ShowResultSet constructPartitionResultSet(List<ResultRow> resultRows, Tab return new ShowResultSet(getMetaData(), result); } + public ShowResultSet constructPartitionCachedStats( + Map<PartitionStatisticCacheKey, PartitionStatistic> resultMap, TableIf tableIf) { + List<List<String>> result = Lists.newArrayList(); + for (Map.Entry<PartitionStatisticCacheKey, PartitionStatistic> entry : resultMap.entrySet()) { + PartitionStatisticCacheKey key = entry.getKey(); + PartitionStatistic value = entry.getValue(); + List<String> row = Lists.newArrayList(); + row.add(key.colName); // column_name + row.add(key.partId); // partition_name + long indexId = key.idxId; + String indexName = indexId == -1 ? tableIf.getName() : ((OlapTable) tableIf).getIndexNameById(indexId); + row.add(indexName); // index_name. + row.add(String.valueOf(value.count)); // count + row.add(String.valueOf(value.ndv.estimateCardinality())); // ndv + row.add(String.valueOf(value.numNulls)); // num_null + row.add(String.valueOf(value.minValue)); // min + row.add(String.valueOf(value.maxValue)); // max + row.add(String.valueOf(value.dataSize)); // data_size + row.add(value.updatedTime); // updated_time + row.add("N/A"); // update_rows + row.add("N/A"); // trigger. Manual or System Review Comment: It's not a TODO. Cached stats doesn't contain update rows and trigger, set it to N/A -- 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