englefly commented on code in PR #35875:
URL: https://github.com/apache/doris/pull/35875#discussion_r1642690421
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculator.java:
##########
@@ -745,8 +747,32 @@ private ColumnStatistic getColumnStatistic(TableIf table,
String colName, long i
return ColumnStatistic.UNKNOWN;
}
} else {
+ if (!partitionNames.isEmpty()) {
+ PartitionColumnStatisticBuilder builder = new
PartitionColumnStatisticBuilder();
+ boolean isFirst = true;
+ boolean hasUnknown = false;
+ for (String partitionName : partitionNames) {
+ PartitionColumnStatistic pcolStats =
Env.getCurrentEnv().getStatisticsCache()
+ .getPartitionColumnStatistics(
+ catalogId, dbId, table.getId(), idxId,
partitionName, colName);
+ if (pcolStats.isUnKnown) {
+ hasUnknown = true;
+ break;
+ }
+ if (isFirst) {
+ builder = new
PartitionColumnStatisticBuilder(pcolStats);
+ isFirst = false;
+ } else {
+ builder.merge(pcolStats);
Review Comment:
done
--
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]