XieJiann commented on code in PR #29902: URL: https://github.com/apache/doris/pull/29902#discussion_r1452970226
########## fe/fe-core/src/main/java/org/apache/doris/nereids/stats/StatsCalculator.java: ########## @@ -644,13 +645,19 @@ private Statistics computeCatalogRelation(CatalogRelation catalogRelation) { } if (!cache.isUnKnown) { rowCount = Math.max(rowCount, cache.count); + } else { + hasUnknownCol = true; } if (ConnectContext.get() != null && ConnectContext.get().getSessionVariable().enableStats) { columnStatisticMap.put(slotReference, cache); } else { columnStatisticMap.put(slotReference, ColumnStatistic.UNKNOWN); + hasUnknownCol = true; } } + if (hasUnknownCol && ConnectContext.get() != null && ConnectContext.get().getStatementContext() != null) { + ConnectContext.get().getStatementContext().setHasUnknownColStats(true); + } Review Comment: if (!isReliable && groupExpr instanceof join) { ConnectContext.get().getStatementContext().setHasUnknownColStats(true); } know - agg -> join(agg unknown?) -- 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