fix not add enumset to str above questionmark bug

This commit is contained in:
obdev
2023-03-06 04:14:01 +00:00
committed by ob-robot
parent 1581cac17a
commit 4f2ab1f735
3 changed files with 19 additions and 9 deletions

View File

@ -92,6 +92,8 @@ int ObRawExprInfoExtractor::visit(ObQueryRefRawExpr &expr)
LOG_WARN("failed to pull info from child", K(ret));
} else if (OB_FAIL(expr.add_flag(IS_SUB_QUERY))) {
LOG_WARN("failed to add is sub query flag", K(ret));
} else if (ob_is_enumset_tc(expr.get_data_type()) && OB_FAIL(expr.add_flag(IS_ENUM_OR_SET))) {
LOG_WARN("failed to add flag IS_ENUM_OR_SET", K(expr), K(ret));
}
return ret;
}

View File

@ -176,7 +176,6 @@ int ObRawExprWrapEnumSet::analyze_all_expr(ObDMLStmt &stmt)
} else if (OB_FAIL(stmt.get_child_stmts(child_stmts))) {
LOG_WARN("get child stmt failed", K(ret));
} else {/*do nothing*/}
for (int64_t i = 0; OB_SUCC(ret) && i < relation_exprs.count(); ++i) {
if (OB_FAIL(analyze_expr(relation_exprs.at(i)))) {
LOG_WARN("failed to analyze expr", K(ret));
@ -201,6 +200,9 @@ int ObRawExprWrapEnumSet::analyze_expr(ObRawExpr *expr)
if (OB_ISNULL(expr)) {
ret = OB_INVALID_ARGUMENT;
LOG_WARN("expr is NULL", K(ret));
// extract info before in case that IS/CNT_ENUM_OR_SET flag has not been set.
} else if (OB_FAIL(expr->extract_info())) {
LOG_WARN("extract info failed", K(ret));
} else if (OB_FAIL(expr->postorder_accept(*this))) {
LOG_WARN("failed to postorder_accept", K(ret));
} else {/*do nothing*/}