kangkaisen commented on a change in pull request #2439: Add bitmap_hash function
URL: https://github.com/apache/incubator-doris/pull/2439#discussion_r356945407
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/planner/LoadScanNode.java
 ##########
 @@ -83,16 +83,17 @@ protected void checkBitmapCompatibility(SlotDescriptor 
slotDesc, Expr expr) thro
                 isCompatible = false;
             } else {
                 FunctionCallExpr fn = (FunctionCallExpr) expr;
-                if 
(!fn.getFnName().getFunction().equalsIgnoreCase(FunctionSet.TO_BITMAP)
-                        && 
!fn.getFnName().getFunction().equalsIgnoreCase(FunctionSet.BITMAP_EMPTY)) {
+                String fnName = fn.getFnName().getFunction().toLowerCase();
+                if (!FunctionSet.BITMAP_LOAD_FNS.contains(fnName)) {
                     isCompatible = false;
                 }
             }
         }
         if (!isCompatible) {
-            throw new AnalysisException("bitmap column must use to_bitmap or 
empty_bitmap function, like "
-                    + slotDesc.getColumn().getName() + "=to_bitmap(xxx)"
-                    + slotDesc.getColumn().getName() + "=bitmap_empty()");
+            throw new AnalysisException("bitmap column must use to_bitmap, 
bitmap_hash or empty_bitmap function, like "
+                    + slotDesc.getColumn().getName() + "=to_bitmap(xxx) or "
+                    + slotDesc.getColumn().getName() + "=bitmap_empty() or "
+                    + slotDesc.getColumn().getName() + "=bitmap_hash(xxx)");
 
 Review comment:
   OK

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


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to