This is an automated email from the ASF dual-hosted git repository.

morrysnow 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 fde4bab048d [fix](Nereids) non-deterministic expression should not be 
constant (#27606)
fde4bab048d is described below

commit fde4bab048d2cc8cadcd943d4ebd6c0998b7fd3d
Author: morrySnow <101034200+morrys...@users.noreply.github.com>
AuthorDate: Mon Nov 27 16:40:30 2023 +0800

    [fix](Nereids) non-deterministic expression should not be constant (#27606)
---
 .../java/org/apache/doris/nereids/trees/expressions/Expression.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

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 a10de9282b2..6922f81ca62 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
@@ -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);
         }
     }
 


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to