[fix](Nereids): CustomRewriteJob don't handle condition rule return null (#27516)
This commit is contained in:
@ -92,6 +92,7 @@ import org.apache.doris.nereids.rules.rewrite.PullUpProjectUnderTopN;
|
||||
import org.apache.doris.nereids.rules.rewrite.PushConjunctsIntoEsScan;
|
||||
import org.apache.doris.nereids.rules.rewrite.PushConjunctsIntoJdbcScan;
|
||||
import org.apache.doris.nereids.rules.rewrite.PushDownCountThroughJoin;
|
||||
import org.apache.doris.nereids.rules.rewrite.PushDownDistinctThroughJoin;
|
||||
import org.apache.doris.nereids.rules.rewrite.PushDownFilterThroughProject;
|
||||
import org.apache.doris.nereids.rules.rewrite.PushDownLimit;
|
||||
import org.apache.doris.nereids.rules.rewrite.PushDownLimitDistinctThroughJoin;
|
||||
@ -280,7 +281,8 @@ public class Rewriter extends AbstractBatchJobExecutor {
|
||||
new PushDownSumThroughJoin(),
|
||||
new PushDownMinMaxThroughJoin(),
|
||||
new PushDownCountThroughJoin()
|
||||
)
|
||||
),
|
||||
custom(RuleType.PUSH_DOWN_DISTINCT_THROUGH_JOIN, PushDownDistinctThroughJoin::new)
|
||||
),
|
||||
|
||||
topic("Limit optimization",
|
||||
|
||||
@ -56,6 +56,9 @@ public class CustomRewriteJob implements RewriteJob {
|
||||
// COUNTER_TRACER.log(CounterEvent.of(Memo.get=-StateId(), CounterType.JOB_EXECUTION, group, logicalExpression,
|
||||
// root));
|
||||
Plan rewrittenRoot = customRewriter.get().rewriteRoot(root, context);
|
||||
if (rewrittenRoot == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
// don't remove this comment, it can help us to trace some bug when developing.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user