diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PredicatePropagation.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PredicatePropagation.java index 45831abbee906b..72e9023dc45df5 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PredicatePropagation.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/rules/rewrite/PredicatePropagation.java @@ -88,6 +88,9 @@ public ComparisonInferInfo(InferType inferType, public Set infer(Set predicates) { Set inferred = Sets.newHashSet(); for (Expression predicate : predicates) { + // if we support more infer predicate expression type, we should impl withInferred() method. + // And should add inferred props in withChildren() method just like ComparisonPredicate, + // and it's subclass, to mark the predicate is from infer. if (!(predicate instanceof ComparisonPredicate)) { continue; } diff --git a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Expression.java b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Expression.java index ebfd57c5c65db9..1ce12fc0efac03 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Expression.java +++ b/fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/Expression.java @@ -242,7 +242,7 @@ public Expression withChildren(List children) { } public Expression withInferred(boolean inferred) { - throw new RuntimeException(); + throw new RuntimeException("current expression has not impl the withInferred method"); } /**