bugfix: ddl adaptation for xml column && remove collation set for clob;

This commit is contained in:
wu-xingying
2023-06-13 08:42:23 +00:00
committed by ob-robot
parent cb73a34eda
commit 55d9685e17
2 changed files with 7 additions and 3 deletions

View File

@ -6269,9 +6269,6 @@ int ObSPIService::convert_obj(ObPLExecCtx *ctx,
for (int i = 0; OB_SUCC(ret) && i < obj_array.count(); ++i) { for (int i = 0; OB_SUCC(ret) && i < obj_array.count(); ++i) {
ObObj &obj = obj_array.at(i); ObObj &obj = obj_array.at(i);
tmp_obj.reset(); tmp_obj.reset();
if (obj.is_clob() && !(ob_is_nstring(result_types[i].get_obj_type()))) {
obj.set_collation_type(result_types[i].get_collation_type());
}
obj.set_collation_level(result_types[i].get_collation_level()); obj.set_collation_level(result_types[i].get_collation_level());
LOG_DEBUG("column convert", K(obj.get_meta()), K(result_types[i].get_meta_type()), LOG_DEBUG("column convert", K(obj.get_meta()), K(result_types[i].get_meta_type()),
K(current_type.at(i)), K(result_types[i].get_accuracy())); K(current_type.at(i)), K(result_types[i].get_accuracy()));

View File

@ -1921,6 +1921,13 @@ int ObCreateTableResolver::resolve_table_elements_from_select(const ParseNode &p
if (OB_FAIL(org_column->set_extended_type_info(column.get_extended_type_info()))) { if (OB_FAIL(org_column->set_extended_type_info(column.get_extended_type_info()))) {
LOG_WARN("set enum or set info failed", K(ret), K(*expr)); LOG_WARN("set enum or set info failed", K(ret), K(*expr));
} }
} else if (is_oracle_mode() && column.is_xmltype()) {
org_column->set_sub_data_type(T_OBJ_XML);
// udt column is varbinary used for null bitmap
org_column->set_udt_set_id(gen_udt_set_id());
if (OB_FAIL(add_generated_hidden_column_for_udt(table_schema, *org_column))) {
LOG_WARN("add udt hidden column to table_schema failed", K(ret), K(column));
}
} }
} }
LOG_DEBUG("ctas oracle mode, create_table_column_count > 0,end", K(column)); LOG_DEBUG("ctas oracle mode, create_table_column_count > 0,end", K(column));