[enchancement](delete) fix delete stmt return error with fold on be (#28557)
This commit is contained in:
@ -245,8 +245,12 @@ public class DeleteStmt extends DdlStmt {
|
||||
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 rightChild = binaryPredicate.getChild(1);
|
||||
Expr rewrittenExpr = FoldConstantsRule.INSTANCE.apply(rightChild, analyzer, null);
|
||||
if (rightChild != rewrittenExpr) {
|
||||
binaryPredicate.setChild(1, rewrittenExpr);
|
||||
}
|
||||
|
||||
Expr leftExpr = binaryPredicate.getChild(0);
|
||||
if (!(leftExpr instanceof SlotRef)) {
|
||||
throw new AnalysisException(
|
||||
|
||||
Reference in New Issue
Block a user