You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by zh...@apache.org on 2020/02/07 01:57:00 UTC

[incubator-doris] branch master updated: Make intersect_count function accept any expression that returns bitmap (#2850)

This is an automated email from the ASF dual-hosted git repository.

zhaoc pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git


The following commit(s) were added to refs/heads/master by this push:
     new feb02ab  Make intersect_count function accept any expression that returns bitmap (#2850)
feb02ab is described below

commit feb02ab27a4da4c80f638222798d15e3970a1916
Author: kangkaisen <ka...@apache.org>
AuthorDate: Fri Feb 7 09:56:54 2020 +0800

    Make intersect_count function accept any expression that returns bitmap (#2850)
---
 .../java/org/apache/doris/analysis/FunctionCallExpr.java    | 13 +++----------
 1 file changed, 3 insertions(+), 10 deletions(-)

diff --git a/fe/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java b/fe/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
index 8ed587b..3c05234 100644
--- a/fe/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
+++ b/fe/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
@@ -18,9 +18,7 @@
 package org.apache.doris.analysis;
 
 import org.apache.doris.catalog.AggregateFunction;
-import org.apache.doris.catalog.AggregateType;
 import org.apache.doris.catalog.Catalog;
-import org.apache.doris.catalog.Column;
 import org.apache.doris.catalog.Database;
 import org.apache.doris.catalog.Function;
 import org.apache.doris.catalog.FunctionSet;
@@ -390,14 +388,9 @@ public class FunctionCallExpr extends Expr {
                         "function requires at least three parameters");
             }
 
-            if (getChild(0) instanceof SlotRef) {
-                SlotRef slotRef = (SlotRef) getChild(0);
-                Column column = slotRef.getDesc().getColumn();
-                if (column != null && column.getAggregationType() != AggregateType.BITMAP_UNION) {
-                    throw new AnalysisException("intersect_count function first arg must be bitmap column");
-                }
-            } else {
-                throw new AnalysisException("intersect_count function first arg must be bitmap column");
+            Type inputType = getChild(0).getType();
+            if (!inputType.isBitmapType()) {
+                throw new AnalysisException("intersect_count function first argument should be of BITMAP type, but was " + inputType);
             }
 
             for(int i = 2; i < children.size(); i++) {


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