eldenmoon commented on code in PR #26749: URL: https://github.com/apache/doris/pull/26749#discussion_r1405575590
########## be/src/vec/data_types/data_type_object.cpp: ########## @@ -47,10 +47,7 @@ namespace doris::vectorized { DataTypeObject::DataTypeObject(const String& schema_format_, bool is_nullable_) : schema_format(to_lower(schema_format_)), is_nullable(is_nullable_) {} bool DataTypeObject::equals(const IDataType& rhs) const { - if (const auto* object = typeid_cast<const DataTypeObject*>(&rhs)) { - return schema_format == object->schema_format && is_nullable == object->is_nullable; - } - return false; + return typeid_cast<const DataTypeObject*>(&rhs) != nullptr; Review Comment: the other is useless at present,check nullptr should be enough ########## be/src/vec/data_types/data_type_object.cpp: ########## @@ -47,10 +47,7 @@ namespace doris::vectorized { DataTypeObject::DataTypeObject(const String& schema_format_, bool is_nullable_) : schema_format(to_lower(schema_format_)), is_nullable(is_nullable_) {} bool DataTypeObject::equals(const IDataType& rhs) const { - if (const auto* object = typeid_cast<const DataTypeObject*>(&rhs)) { - return schema_format == object->schema_format && is_nullable == object->is_nullable; - } - return false; + return typeid_cast<const DataTypeObject*>(&rhs) != nullptr; Review Comment: the other is useless at present,check nullptr should be enough -- 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