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
commit ac5ca421f8001f7286af4ac5cc36f2982a089619 Author: Pxl <[email protected]> AuthorDate: Thu Sep 14 14:15:27 2023 +0800 [Improvement](delete) cast delete binary predicate rhs type to lhs type (#24321) cast delete binary predicate rhs type to lhs type --- fe/fe-core/src/main/java/org/apache/doris/analysis/DeleteStmt.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/DeleteStmt.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/DeleteStmt.java index 351fd4f82c..872edf8aba 100644 --- a/fe/fe-core/src/main/java/org/apache/doris/analysis/DeleteStmt.java +++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/DeleteStmt.java @@ -237,7 +237,12 @@ public class DeleteStmt extends DdlStmt { } if (predicate instanceof BinaryPredicate) { BinaryPredicate binaryPredicate = (BinaryPredicate) predicate; + binaryPredicate.getChild(0).analyze(analyzer); + binaryPredicate.getChild(1).analyze(analyzer); + + binaryPredicate.setChild(1, binaryPredicate.getChild(1).castTo(binaryPredicate.getChild(0).getType())); binaryPredicate.analyze(analyzer); + ExprRewriter exprRewriter = new ExprRewriter(FoldConstantsRule.INSTANCE); binaryPredicate.setChild(1, exprRewriter.rewrite(binaryPredicate.getChild(1), analyzer, null)); Expr leftExpr = binaryPredicate.getChild(0); --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
