mrhhsg commented on code in PR #64293:
URL: https://github.com/apache/doris/pull/64293#discussion_r3379235698


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/jobs/executor/Analyzer.java:
##########
@@ -196,7 +197,10 @@ private static List<RewriteJob> buildAnalyzerJobs() {
             //       -->project(encode A as x)
             //            -->scan(T)
             bottomUp(new CompressedMaterialize()),
-            topDown(new NormalizeAggregate()),
+            topDown(
+                    new CountConstantRewrite(),

Review Comment:
   Thanks, addressed. I removed the separate `CountConstantRewrite`/rule type 
and moved the row-independent expression handling into the existing 
`CountLiteralRewrite`. The analyzer/rewriter now reuse `CountLiteralRewrite` 
before `NormalizeAggregate`, and the existing post-normalization literal 
rewrite remains in place.
   
   Validated with:
   - `./run-fe-ut.sh --run 
org.apache.doris.nereids.rules.rewrite.CountLiteralRewriteTest`
   - local regression `count_constant_rewrite` via `doris-local-regression ... 
all -d nereids_rules_p0/count_constant_rewrite -s count_constant_rewrite`
   - `git diff --check`



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