xy720 commented on code in PR #16444:
URL: https://github.com/apache/doris/pull/16444#discussion_r1099761152


##########
fe/fe-common/src/main/java/org/apache/doris/catalog/MapType.java:
##########
@@ -88,6 +119,16 @@ protected String prettyPrint(int lpad) {
         return String.format("%sMAP<%s,%s>", leftPadding, keyType.toSql(), 
structStr);
     }
 
+    public static boolean canCastTo(MapType type, MapType targetType) {
+        return Type.canCastTo(type.getKeyType(), targetType.getKeyType())
+            && Type.canCastTo(type.getValueType(), targetType.getValueType());
+    }
+
+    @Override
+    public boolean supportSubType(Type subType) {
+        return true;

Review Comment:
   This will do in next map pr.
   Here I add a todo comment to limit map key type to scalar type.



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