This is an automated email from the ASF dual-hosted git repository.
englefly pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new 70b40d3f883 [opt](nereids)invoke validator after topn lazy
materialization processor if feDebug is on (#56344)
70b40d3f883 is described below
commit 70b40d3f88398e05d3b9796e66d8ebaa55899a66
Author: minghong <[email protected]>
AuthorDate: Mon Sep 29 15:20:25 2025 +0800
[opt](nereids)invoke validator after topn lazy materialization processor if
feDebug is on (#56344)
### What problem does this PR solve?
invoke validator after topn lazy materialization processor if feDebug is
on.
---
.../processor/post/materialize/LazyMaterializeTopN.java | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/materialize/LazyMaterializeTopN.java
b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/materialize/LazyMaterializeTopN.java
index f5fdde6d2db..e2408ae2eb5 100644
---
a/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/materialize/LazyMaterializeTopN.java
+++
b/fe/fe-core/src/main/java/org/apache/doris/nereids/processor/post/materialize/LazyMaterializeTopN.java
@@ -22,6 +22,7 @@ import org.apache.doris.catalog.Type;
import org.apache.doris.nereids.CascadesContext;
import org.apache.doris.nereids.StatementContext;
import org.apache.doris.nereids.processor.post.PlanPostProcessor;
+import org.apache.doris.nereids.processor.post.Validator;
import org.apache.doris.nereids.trees.expressions.Slot;
import org.apache.doris.nereids.trees.expressions.SlotReference;
import org.apache.doris.nereids.trees.expressions.StatementScopeIdGenerator;
@@ -67,6 +68,19 @@ public class LazyMaterializeTopN extends PlanPostProcessor {
@Override
public Plan visitPhysicalTopN(PhysicalTopN topN, CascadesContext ctx) {
+ try {
+ Plan result = computeTopN(topN, ctx);
+ if (SessionVariable.isFeDebug()) {
+ Validator validator = new Validator();
+ validator.processRoot(result, ctx);
+ }
+ return result;
+ } catch (Exception e) {
+ return topN;
+ }
+ }
+
+ private Plan computeTopN(PhysicalTopN topN, CascadesContext ctx) {
if (hasMaterialized) {
return topN;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]