Mryange commented on code in PR #53659:
URL: https://github.com/apache/doris/pull/53659#discussion_r2359202660


##########
be/src/vec/data_types/data_type_date_or_datetime_v2.cpp:
##########
@@ -135,7 +135,8 @@ void DataTypeDateV2::cast_from_date_time(const Int64 from, 
UInt32& to) {
 }
 
 bool DataTypeDateTimeV2::equals(const IDataType& rhs) const {
-    return typeid(rhs) == typeid(*this);
+    return typeid(rhs) == typeid(*this) &&
+           _scale == assert_cast<const DataTypeDateTimeV2&>(rhs)._scale;

Review Comment:
   这里可以不用cast,有一个get_scale()的虚函数



-- 
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]

Reply via email to