starocean999 commented on code in PR #33630: URL: https://github.com/apache/doris/pull/33630#discussion_r1565128487
########## fe/fe-core/src/main/java/org/apache/doris/qe/StmtExecutor.java: ########## @@ -1426,21 +1426,24 @@ private void analyzeAndGenerateQueryPlan(TQueryOptions tQueryOptions) throws Use reAnalyze = true; } if (parsedStmt instanceof SelectStmt) { - if (StmtRewriter.rewriteByPolicy(parsedStmt, analyzer)) { + if (StmtRewriter.rewriteByPolicy(parsedStmt, analyzer) + || StmtRewriter.rewriteForRandomDistribution(parsedStmt, analyzer)) { reAnalyze = true; } } if (parsedStmt instanceof SetOperationStmt) { List<SetOperationStmt.SetOperand> operands = ((SetOperationStmt) parsedStmt).getOperands(); for (SetOperationStmt.SetOperand operand : operands) { - if (StmtRewriter.rewriteByPolicy(operand.getQueryStmt(), analyzer)) { + if (StmtRewriter.rewriteByPolicy(operand.getQueryStmt(), analyzer) + || StmtRewriter.rewriteForRandomDistribution(operand.getQueryStmt(), analyzer)) { reAnalyze = true; } } } if (parsedStmt instanceof InsertStmt) { QueryStmt queryStmt = ((InsertStmt) parsedStmt).getQueryStmt(); - if (queryStmt != null && StmtRewriter.rewriteByPolicy(queryStmt, analyzer)) { + if (queryStmt != null && StmtRewriter.rewriteByPolicy(queryStmt, analyzer) + || StmtRewriter.rewriteForRandomDistribution(queryStmt, analyzer)) { Review Comment: queryStmt != null && (StmtRewriter.rewriteByPolicy(queryStmt, analyzer) || StmtRewriter.rewriteForRandomDistribution(queryStmt, analyzer)) -- 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