924060929 opened a new pull request, #32617: URL: https://github.com/apache/doris/pull/32617
## Proposed changes current state is draft this pr can improve the performance of the nereids planner, in plan stage. 1. refactor expression rewriter to pattern match, so the lots of expression rewrite rule can criss-crossed apply in a big bottom-up iteration, and rewrite until the expression became stable. now we can process more cases because original there has no loop, and only process the top expression, like `SimplifyArithmeticRule`. 2.replace `Collection.stream()` to `ImmutableXxx.Builder` to avoid useless method call 3. Loop Unrolling some code, like `Expression.<init>`, `PlanTreeRewriteBottomUpJob.pushChildrenJobs` 4. Type/Arity specified-code, like `OneRangePartitionEvaluator.toNereidsLiterals()`, `PartitionRangeExpander.tryExpandRange()`, `PartitionRangeExpander.enumerableCount()` 5. refactor `ExtractCommonFactorRule`, now can extract more cases, and I fix the deed loop when use `ExtractCommonFactorRule` and `SimplifyRange` in a iterative, because `SimplifyRange` generate right deep tree, but `ExtractCommonFactorRule` generate left deep tree 6. refactor `FoldConstantRuleOnFE`, suport visitor/pattern match mode, in ExpressionNormalization, pattern match can criss-crossed apply with other rules; in PartitionPruner, visitor can evaluate expression faster -- 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