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


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/types/DateTimeV2Type.java:
##########
@@ -147,9 +147,10 @@ public boolean equals(Object o) {
         return Objects.equals(scale, that.scale);
     }
 
+    // used in implicitCastPrimitiveInternal. must make sure they are same 
type.
     @Override
     public boolean acceptsType(DataType other) {
-        return other instanceof DateTimeV2Type;
+        return this.equals(other);

Review Comment:
   这里也是,如果这么改的话,可能很多函数的签名搜索不能work



##########
fe/fe-common/src/main/java/org/apache/doris/catalog/ScalarType.java:
##########
@@ -919,7 +919,7 @@ public boolean matchesType(Type t) {
             return precision == scalarType.precision && scale == 
scalarType.scale;
         }
         if (isDatetimeV2() && scalarType.isDatetimeV2()) {
-            return true;
+            return scale == scalarType.scale;

Review Comment:
   这个函数应该是不能这么改的,在很多地方使用了,而且已经依赖了精度不同也相等



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