Skip to content

Commit

Permalink
[fix](Nereids) non-deterministic expression should not be constant (a…
Browse files Browse the repository at this point in the history
  • Loading branch information
morrySnow authored and eldenmoon committed Dec 3, 2023
1 parent 7dfcfbd commit 41cf5c3
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import org.apache.doris.nereids.exceptions.AnalysisException;
import org.apache.doris.nereids.trees.AbstractTreeNode;
import org.apache.doris.nereids.trees.expressions.functions.ExpressionTrait;
import org.apache.doris.nereids.trees.expressions.functions.Nondeterministic;
import org.apache.doris.nereids.trees.expressions.literal.Literal;
import org.apache.doris.nereids.trees.expressions.literal.NullLiteral;
import org.apache.doris.nereids.trees.expressions.shape.LeafExpression;
Expand Down Expand Up @@ -141,7 +142,7 @@ public boolean isConstant() {
if (this instanceof LeafExpression) {
return this instanceof Literal;
} else {
return children().stream().allMatch(Expression::isConstant);
return !(this instanceof Nondeterministic) && children().stream().allMatch(Expression::isConstant);
}
}

Expand Down

0 comments on commit 41cf5c3

Please sign in to comment.