morningman commented on code in PR #8882:
URL: https://github.com/apache/incubator-doris/pull/8882#discussion_r844641534


##########
fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java:
##########
@@ -134,23 +134,29 @@ public TypeDef getTargetTypeDef() {
         return targetTypeDef;
     }
 
+    private static boolean disableRegisterCastingFunction(Type fromType, Type 
toType) {
+        // Disable casting from boolean to decimal or datetime or date
+        if (fromType.isBoolean() &&
+                (toType.equals(Type.DECIMALV2) ||
+                        toType.equals(Type.DATETIME) || 
toType.equals(Type.DATE))) {
+            return true;
+        }
+
+        // Disable casting operation of hll/bitmap
+        if (fromType.isBitmapType() || fromType.isHllType() || 
toType.isHllType() || toType.isBitmapType()) {

Review Comment:
   We also had a `QUANTILE_STATE
   You can use `isObjectStored()` instead.



##########
fe/fe-core/src/main/java/org/apache/doris/catalog/PrimitiveType.java:
##########
@@ -266,8 +264,6 @@
         builder.put(STRING, DECIMALV2);
         builder.put(STRING, VARCHAR);
         builder.put(STRING, STRING);
-        builder.put(STRING, HLL);
-        builder.put(STRING, BITMAP);
         builder.put(STRING, QUANTILE_STATE);

Review Comment:
   disable `STRING, QUANTILE_STATE`



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