EmmyMiao87 commented on a change in pull request #5799:
URL: https://github.com/apache/incubator-doris/pull/5799#discussion_r630812644



##########
File path: 
fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
##########
@@ -278,10 +278,19 @@ private boolean canCompareDate(PrimitiveType t1, 
PrimitiveType t2) {
         }
     }
 
-    private Type getCmpType() {
+    private Type getCmpType() throws AnalysisException {
         PrimitiveType t1 = 
getChild(0).getType().getResultType().getPrimitiveType();
         PrimitiveType t2 = 
getChild(1).getType().getResultType().getPrimitiveType();
 
+        for (Expr e : getChildren()) {
+            if (e.getType().getPrimitiveType() == PrimitiveType.HLL) {
+                throw new AnalysisException("Hll type can not be a operand: " 
+ toSql());

Review comment:
       ```suggestion
                   throw new AnalysisException("Hll type does not support 
operand: " + toSql());
   ```

##########
File path: 
fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
##########
@@ -278,10 +278,19 @@ private boolean canCompareDate(PrimitiveType t1, 
PrimitiveType t2) {
         }
     }
 
-    private Type getCmpType() {
+    private Type getCmpType() throws AnalysisException {
         PrimitiveType t1 = 
getChild(0).getType().getResultType().getPrimitiveType();
         PrimitiveType t2 = 
getChild(1).getType().getResultType().getPrimitiveType();
 
+        for (Expr e : getChildren()) {
+            if (e.getType().getPrimitiveType() == PrimitiveType.HLL) {
+                throw new AnalysisException("Hll type can not be a operand: " 
+ toSql());
+            }
+            if (e.getType().getPrimitiveType() == PrimitiveType.BITMAP) {
+                throw new AnalysisException("Bitmap type can not be a operand: 
" + toSql());

Review comment:
       ```suggestion
                   throw new AnalysisException("Bitmap type does not support 
operand: " + toSql());
   ```




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

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