csun5285 commented on code in PR #67642:
URL: https://github.com/apache/doris/pull/67642#discussion_r4024087124


##########
fe/fe-core/src/main/java/org/apache/doris/statistics/analysis/OlapAnalysisTask.java:
##########
@@ -150,6 +150,8 @@ protected ResultRow collectMinMax() {
         String sql = stringSubstitutor.replace(BASIC_STATS_TEMPLATE);
         ResultRow resultRow;
         try (AutoCloseConnectContext r = 
StatisticsUtil.buildConnectContext(false)) {
+            // Force this statistics query to take min/max from the zone map.
+            
r.connectContext.getSessionVariable().setForcePushDownZonemapMinMax(true);

Review Comment:
   buildConnectContext 会被复用,导致不是统计信息的查询也会设置上这个,比如 SimpleAggCacheMgr 中的sql 
`SELECT min(`col`), max(`col`) FROM `catalog`.`db`.`tbl``



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