xiaokang commented on code in PR #33890:
URL: https://github.com/apache/doris/pull/33890#discussion_r1590199297


##########
be/src/vec/common/schema_util.cpp:
##########
@@ -114,31 +114,8 @@ bool is_conversion_required_between_integers(const 
IDataType& lhs, const IDataTy
     WhichDataType which_rhs(rhs);
     bool is_native_int = which_lhs.is_native_int() && 
which_rhs.is_native_int();
     bool is_native_uint = which_lhs.is_native_uint() && 
which_rhs.is_native_uint();
-    return (is_native_int || is_native_uint) &&
-           lhs.get_size_of_value_in_memory() <= 
rhs.get_size_of_value_in_memory();
-}
-
-bool is_conversion_required_between_integers(FieldType lhs, FieldType rhs) {
-    // We only support signed integers for semi-structure data at present
-    // TODO add unsigned integers
-    if (lhs == FieldType::OLAP_FIELD_TYPE_BIGINT) {
-        return !(rhs == FieldType::OLAP_FIELD_TYPE_TINYINT ||
-                 rhs == FieldType::OLAP_FIELD_TYPE_SMALLINT ||
-                 rhs == FieldType::OLAP_FIELD_TYPE_INT || rhs == 
FieldType::OLAP_FIELD_TYPE_BIGINT);
-    }
-    if (lhs == FieldType::OLAP_FIELD_TYPE_INT) {
-        return !(rhs == FieldType::OLAP_FIELD_TYPE_TINYINT ||
-                 rhs == FieldType::OLAP_FIELD_TYPE_SMALLINT ||
-                 rhs == FieldType::OLAP_FIELD_TYPE_INT);
-    }
-    if (lhs == FieldType::OLAP_FIELD_TYPE_SMALLINT) {
-        return !(rhs == FieldType::OLAP_FIELD_TYPE_TINYINT ||
-                 rhs == FieldType::OLAP_FIELD_TYPE_SMALLINT);
-    }
-    if (lhs == FieldType::OLAP_FIELD_TYPE_TINYINT) {
-        return !(rhs == FieldType::OLAP_FIELD_TYPE_TINYINT);
-    }
-    return true;
+    return (!is_native_int && !is_native_uint) ||

Review Comment:
   opposite to original code?



-- 
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: commits-unsubscr...@doris.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to