diff --git a/src/sql/resolver/expr/ob_raw_expr_info_extractor.cpp b/src/sql/resolver/expr/ob_raw_expr_info_extractor.cpp index ec8e4948d..fb5fd29a8 100644 --- a/src/sql/resolver/expr/ob_raw_expr_info_extractor.cpp +++ b/src/sql/resolver/expr/ob_raw_expr_info_extractor.cpp @@ -288,10 +288,6 @@ int ObRawExprInfoExtractor::visit(ObOpRawExpr &expr) if (OB_FAIL(expr.add_flag(IS_IN))) { LOG_WARN("failed to add flag IS_IN", K(ret)); } - } else if (expr.get_expr_type() == T_OP_OR) { - if (OB_FAIL(expr.add_flag(IS_OR))) { - LOG_WARN("failed to add flag IS_OR", K(ret)); - } } else if (expr.get_expr_type() == T_OP_ASSIGN) { if (OB_FAIL(expr.add_flag(IS_ASSIGN_EXPR))) { LOG_WARN("failed to add flag IS_ASSIGN_EXPR", K(ret)); @@ -319,6 +315,11 @@ int ObRawExprInfoExtractor::visit(ObOpRawExpr &expr) } } else {} } + if (OB_SUCC(ret) && expr.get_expr_type() == T_OP_OR) { + if (OB_FAIL(expr.add_flag(IS_OR))) { + LOG_WARN("failed to add flag IS_OR", K(ret)); + } + } if (OB_SUCC(ret) && OB_FAIL(visit_subquery_node(expr))) { LOG_WARN("visit subquery node failed", K(ret)); } diff --git a/unittest/sql/resolver/expr/test_raw_expr_canonicalizer.result b/unittest/sql/resolver/expr/test_raw_expr_canonicalizer.result index 3c67b8a15..ae97350fd 100644 --- a/unittest/sql/resolver/expr/test_raw_expr_canonicalizer.result +++ b/unittest/sql/resolver/expr/test_raw_expr_canonicalizer.result @@ -1416,8 +1416,10 @@ not a between 1 and 100 } }, "expr_info": [ + "IS_OR", "IS_CONST_EXPR", - "CNT_CONST" + "CNT_CONST", + "CNT_OR" ], "rel_id": [ ],