englefly commented on code in PR #64080:
URL: https://github.com/apache/doris/pull/64080#discussion_r3360058444


##########
fe/fe-core/src/main/java/org/apache/doris/nereids/types/coercion/CharacterType.java:
##########
@@ -42,6 +42,11 @@ public int getLen() {
         return len;
     }
 
+    @Override
+    public boolean canSafetyCastTo(DataType target) {

Review Comment:
   canSafetyCastTo 的目的是: 把 cast 看成函数,要求这个是单射,对吗
   如果是这样,建议改个名字 isInjectiveCastTo



##########
fe/fe-core/src/main/java/org/apache/doris/nereids/types/coercion/CharacterType.java:
##########
@@ -42,6 +42,11 @@ public int getLen() {
         return len;
     }
 
+    @Override

Review Comment:
   char[100] cast 成 char[10] 应该不能提升到 distinct 之上



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