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