eldenmoon commented on code in PR #33890:
URL: https://github.com/apache/doris/pull/33890#discussion_r1590508484
##########
be/src/vec/columns/column_object.cpp:
##########
@@ -308,18 +399,29 @@ void ColumnObject::Subcolumn::insert(Field field,
FieldInfo info) {
value_dim = 0;
type_changed = true;
}
+ // Always expected nullable at present
if (is_nullable && !is_nothing(base_type)) {
base_type = make_nullable(base_type);
}
-
const auto& least_common_base_type = least_common_type.get_base();
+ const auto& nested_common_base_type =
+ is_nullable ? static_cast<const
DataTypeNullable&>(*least_common_base_type)
+ .get_nested_type()
+ : least_common_base_type;
+ const auto& nested_base_type =
+ is_nullable ? static_cast<const
DataTypeNullable&>(*base_type).get_nested_type()
+ : base_type;
+
if (data.empty()) {
add_new_column_part(create_array_of_type(std::move(base_type),
value_dim, is_nullable));
- } else if (!least_common_base_type->equals(*base_type) &&
!is_nothing(base_type)) {
- if (!schema_util::is_conversion_required_between_integers(*base_type,
-
*least_common_base_type)) {
+ } else if (!nested_common_base_type->equals(*nested_base_type) &&
+ !is_nothing(nested_base_type)) {
+ if
(schema_util::is_conversion_required_between_integers(*nested_base_type,
+
*nested_common_base_type)) {
+ LOG_EVERY_N(INFO, 100) << "Conversion between " <<
base_type->get_name() << " and "
+ << least_common_base_type->get_name();
get_least_supertype<LeastSupertypeOnError::Jsonb>(
Review Comment:
in `add_new_column_part`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]