diff --git a/src/common/backend/parser/parse_expr.cpp b/src/common/backend/parser/parse_expr.cpp index 2220c26c4bfd310b0b7da978b7b5e661de66ba67..ac497130ca419f6007d8116462398c8e2f2b4589 100644 --- a/src/common/backend/parser/parse_expr.cpp +++ b/src/common/backend/parser/parse_expr.cpp @@ -1523,7 +1523,13 @@ static Node* transformAExprOp(ParseState* pstate, A_Expr* a) lexpr = transformExprRecurse(pstate, lexpr); rexpr = transformExprRecurse(pstate, rexpr); - result = (Node*)make_op(pstate, a->name, lexpr, rexpr, last_srf, a->location); + bool isNumeric = false; + if (DB_IS_CMPT(A_FORMAT) || DB_IS_CMPT(B_FORMAT)) { + Oid ltypeId = exprType(lexpr); + Oid rtypeId = exprType(rexpr); + isNumeric = (IsIntType(ltypeId) && IsCharType(rtypeId)) || (IsIntType(rtypeId) && IsCharType(ltypeId)); + } + result = (Node*)make_op(pstate, a->name, lexpr, rexpr, last_srf, a->location, isNumeric); } return result;