【xmlbugfix】fix insert/update op returning xmltype, but result is NULL
This commit is contained in:
@ -1071,9 +1071,13 @@ int ObInsertResolver::try_expand_returning_exprs()
|
||||
CK(column_convert.count() == table_columns.count());
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < insert_stmt->get_returning_exprs().count(); i++) {
|
||||
for (int64_t j = 0; OB_SUCC(ret) && j < table_columns.count(); j++) {
|
||||
OZ(ObRawExprUtils::replace_ref_column(insert_stmt->get_returning_exprs().at(i),
|
||||
if (table_columns.at(j)->is_xml_column()) {
|
||||
// do nothing and will rewrite in trnsform stage
|
||||
} else {
|
||||
OZ(ObRawExprUtils::replace_ref_column(insert_stmt->get_returning_exprs().at(i),
|
||||
table_columns.at(j),
|
||||
column_convert.at(j)));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -215,7 +215,9 @@ int ObUpdateResolver::try_expand_returning_exprs()
|
||||
ObIArray<ObAssignment> &assignments = tables_info.at(0)->assignments_;
|
||||
ObRawExprCopier copier(*params_.expr_factory_);
|
||||
for (int64_t i = 0; OB_SUCC(ret) && i < assignments.count(); ++i) {
|
||||
if (OB_FAIL(copier.add_replaced_expr(assignments.at(i).column_expr_,
|
||||
if (assignments.at(i).column_expr_->is_xml_column()) {
|
||||
// skip and will rewite in transform stage
|
||||
} else if (OB_FAIL(copier.add_replaced_expr(assignments.at(i).column_expr_,
|
||||
assignments.at(i).expr_))) {
|
||||
LOG_WARN("failed to add replaced expr", K(ret));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user