This is an automated email from the ASF dual-hosted git repository.
kxiao pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/branch-2.0 by this push:
new 36184fe93e8 [fix](Nereids) non-deterministic expression should not be
constant (#27606) (#27631)
36184fe93e8 is described below
commit 36184fe93e858db6b0784fda58ab76cd6b070804
Author: morrySnow <[email protected]>
AuthorDate: Mon Nov 27 20:44:42 2023 +0800
[fix](Nereids) non-deterministic expression should not be constant (#27606)
(#27631)
---
.../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 2fd89cbfa4e..d26e3b3e9f4 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
@@ -21,6 +21,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;
@@ -141,7 +142,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: [email protected]
For additional commands, e-mail: [email protected]