morrySnow commented on code in PR #9303:
URL: https://github.com/apache/incubator-doris/pull/9303#discussion_r861608424


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java:
##########
@@ -1040,6 +1048,21 @@ private void analyzeAggregation(Analyzer analyzer) 
throws AnalysisException {
         aggExprs.clear();
         TreeNode.collect(substitutedAggs, Expr.isAggregatePredicate(), 
aggExprs);
 
+        if (metaQuery) {
+            long globalDictFuncCount = 
aggExprs.stream().filter(FunctionCallExpr::isGlobalDict).count();
+            if (globalDictFuncCount == 0) {
+                // simply ignore the hint
+                metaQuery = false;

Review Comment:
   OlapMetaScanNode still be created even if we turned off this flag, correct?



##########
fe/fe-core/src/main/java/org/apache/doris/analysis/SelectStmt.java:
##########
@@ -1040,6 +1048,21 @@ private void analyzeAggregation(Analyzer analyzer) 
throws AnalysisException {
         aggExprs.clear();
         TreeNode.collect(substitutedAggs, Expr.isAggregatePredicate(), 
aggExprs);
 
+        if (metaQuery) {

Review Comment:
   should we remove meta hint, and turn ScanNode to OlapMetaScanNode 
automaticaly when we found some function need to do meta query?



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