[fix](Nereids): move SimplifyAggGroupBy before NormalizeAggregate. (#18918)

This commit is contained in:
jakevin
2023-04-24 19:00:27 +08:00
committed by GitHub
parent b2c26e17e1
commit 54d58364c1

View File

@ -150,15 +150,15 @@ public class NereidsRewriter extends BatchRewriteJob {
),
topic("Window analysis",
topDown(
new SimplifyAggGroupBy()
),
topDown(
new ExtractAndNormalizeWindowExpression(),
// execute NormalizeAggregate() again to resolve nested AggregateFunctions in WindowExpression,
// e.g. sum(sum(c1)) over(partition by avg(c1))
new NormalizeAggregate(),
new CheckAndStandardizeWindowFunctionAndFrame()
),
topDown(
new SimplifyAggGroupBy()
)
),