diff --git a/src/sql/ob_spi.cpp b/src/sql/ob_spi.cpp index 8c27b8e520..c596fb6dc3 100644 --- a/src/sql/ob_spi.cpp +++ b/src/sql/ob_spi.cpp @@ -6269,9 +6269,6 @@ int ObSPIService::convert_obj(ObPLExecCtx *ctx, for (int i = 0; OB_SUCC(ret) && i < obj_array.count(); ++i) { ObObj &obj = obj_array.at(i); 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()); 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())); diff --git a/src/sql/resolver/ddl/ob_create_table_resolver.cpp b/src/sql/resolver/ddl/ob_create_table_resolver.cpp index 0d7f4da8ac..486c06d9fb 100644 --- a/src/sql/resolver/ddl/ob_create_table_resolver.cpp +++ b/src/sql/resolver/ddl/ob_create_table_resolver.cpp @@ -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()))) { 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));