bugfix: 49298642,49243905,49422634

This commit is contained in:
obdev
2023-05-04 12:30:08 +00:00
committed by ob-robot
parent b7de32a0a4
commit f6c3ecdd97
5 changed files with 28 additions and 6 deletions

View File

@ -4596,11 +4596,14 @@ int ObRawExprPrinter::print_xml_attributes_expr(ObSysFunRawExpr *expr)
DATA_PRINTF(",");
}
PRINT_EXPR(expr->get_param_expr(i));
ObString attr_key = static_cast<ObConstRawExpr*>(expr->get_param_expr(i + 1))->get_value().get_string();
if (!attr_key.empty()) {
ObObj attr_key_obj = static_cast<ObConstRawExpr*>(expr->get_param_expr(i + 1))->get_value();
if (attr_key_obj.get_type() == ObObjType::ObUnknownType) {
DATA_PRINTF(" as evalname ");
PRINT_EXPR(expr->get_param_expr(i + 1));
} else if (!attr_key_obj.get_string().empty()) {
// While the result obtained during anti-spelling has been parsed,
// so adding all double quotes can achieve the desired result
DATA_PRINTF(" as \"%.*s\"", LEN_AND_PTR(attr_key));
DATA_PRINTF(" as \"%.*s\"", LEN_AND_PTR(attr_key_obj.get_string()));
}
}
DATA_PRINTF(")");