This is an automated email from the ASF dual-hosted git repository.
morrysnow 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 5e7398104b8 [fix](planner) binary predicate result should compare with
0 (#39474) (#39720)
5e7398104b8 is described below
commit 5e7398104b88dff328fea8e44fe5d3cb71f284aa
Author: morrySnow <[email protected]>
AuthorDate: Wed Aug 21 18:54:30 2024 +0800
[fix](planner) binary predicate result should compare with 0 (#39474)
(#39720)
pick from master #39474
---
.../src/main/java/org/apache/doris/analysis/BinaryPredicate.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
b/fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
index e513a738361..05014a4e0f0 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
@@ -739,7 +739,7 @@ public class BinaryPredicate extends Predicate implements
Writable {
return compareLiteral((LiteralExpr) leftChildValue, (LiteralExpr)
rightChildValue);
}
- private Expr compareLiteral(LiteralExpr first, LiteralExpr second) throws
AnalysisException {
+ private Expr compareLiteral(LiteralExpr first, LiteralExpr second) {
final boolean isFirstNull = (first instanceof NullLiteral);
final boolean isSecondNull = (second instanceof NullLiteral);
if (op == Operator.EQ_FOR_NULL) {
@@ -764,7 +764,7 @@ public class BinaryPredicate extends Predicate implements
Writable {
case GT:
return new BoolLiteral(compareResult > 0);
case LE:
- return new BoolLiteral(compareResult == -1 || compareResult ==
0);
+ return new BoolLiteral(compareResult <= 0);
case LT:
return new BoolLiteral(compareResult < 0);
case NE:
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]