kangkaisen commented on a change in pull request #1721: Make bitmap_union agg 
column support insert into and broker load
URL: https://github.com/apache/incubator-doris/pull/1721#discussion_r319023099
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/InsertStmt.java
 ##########
 @@ -478,6 +489,24 @@ private void checkHllCompatibility(Column col, Expr expr) 
throws AnalysisExcepti
         }
     }
 
+    private void checkBitmapCompatibility(Column col, Expr expr) throws 
AnalysisException {
+        final String bitmapMismatchLog = "Column's agg type is bitmap_union,"
+                + " SelectList must contains bitmap_union column or to_bitmap 
function's result, column=" + col.getName();
+        if (expr instanceof SlotRef) {
+            final SlotRef slot = (SlotRef) expr;
+            if (slot.getDesc().getColumn().getAggregationType() != 
AggregateType.BITMAP_UNION ) {
+                throw new AnalysisException(bitmapMismatchLog);
+            }
+        } else if (expr instanceof FunctionCallExpr) {
+            final FunctionCallExpr functionExpr = (FunctionCallExpr) expr;
+            if 
(!functionExpr.getFnName().getFunction().equalsIgnoreCase(FunctionSet.TO_BITMAP))
 {
 
 Review comment:
   Update

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