wjjc1017 commented on issue #69491: URL: https://github.com/apache/doris/issues/69491#issuecomment-6357442233
I reran this locally on **doris-4.1.3-rc02-7126cf65d96** with 3 rows in each branch: - `COUNT(k) + 10` → **16** - `COUNT(k)` → **6** `EXPLAIN REWRITTEN PLAN` shows `Project(k, count(k) + 10)` over `Aggregate(sum0(count(k)))` over `UnionAll`: `NormalizeAggregate` extracted the count, and `PushCountIntoUnionAll` rewrote the direct `Alias(COUNT(k))` correctly, with `+ 10` evaluated once above. The `12` I reported came from a hand-constructed **unnormalized rule-level plan**, not from a Doris execution; I am withdrawing the user-visible P0 claim. The residual is only a defensive guard/rewrite shape mismatch: `checkAgg` accepts compound outputs that `doPush` cannot handle if such a shape ever reaches the rule. A rule-level test plus a stricter guard (or a recursive rewrite) would close that gap; I agree that requiring every output to be `Alias(Count(...))` would incorrectly disable valid grouped cases. If you treat this as test-only hardening, please close as not-a-bug. -- 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]
