[fix](Nereids) non-deterministic expression should not be constant (#27606)
This commit is contained in:
@ -22,6 +22,7 @@ import org.apache.doris.nereids.analyzer.Unbound;
|
||||
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;
|
||||
@ -226,7 +227,7 @@ public abstract class Expression extends AbstractTreeNode<Expression> implements
|
||||
if (this instanceof LeafExpression) {
|
||||
return this instanceof Literal;
|
||||
} else {
|
||||
return children().stream().allMatch(Expression::isConstant);
|
||||
return !(this instanceof Nondeterministic) && children().stream().allMatch(Expression::isConstant);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user