You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@doris.apache.org by GitBox <gi...@apache.org> on 2019/08/29 10:47:19 UTC

[GitHub] [incubator-doris] imay commented on a change in pull request #1721: Make bitmap_union agg column support insert into

imay commented on a change in pull request #1721: Make bitmap_union agg column support insert into
URL: https://github.com/apache/incubator-doris/pull/1721#discussion_r319002033
 
 

 ##########
 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:
   I think BITMAP_UNION() is OK too.
   
   And you should add in 
   fe/src/main/java/org/apache/doris/planner/BrokerScanNode.java:452
   fe/src/main/java/org/apache/doris/planner/StreamLoadScanNode.java:278

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@doris.apache.org
For additional commands, e-mail: dev-help@doris.apache.org