diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PlanPostProcessors.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PlanPostProcessors.java index 787be605db132f5..9ae4c55608b765a 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PlanPostProcessors.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/PlanPostProcessors.java @@ -61,6 +61,7 @@ public List getProcessors() { builder.add(new PushdownFilterThroughProject()); builder.add(new MergeProjectPostProcessor()); builder.add(new RecomputeLogicalPropertiesProcessor()); + builder.add(new TopNScanOpt()); // after generate rf, DO NOT replace PLAN NODE builder.add(new FragmentProcessor()); if (!cascadesContext.getConnectContext().getSessionVariable().getRuntimeFilterMode() @@ -71,7 +72,6 @@ public List getProcessors() { } } builder.add(new Validator()); - builder.add(new TopNScanOpt()); return builder.build(); } }