You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by GitBox <gi...@apache.org> on 2020/02/21 08:39:10 UTC

[GitHub] [incubator-doris] kangkaisen opened a new pull request #2966: Add more constraints for bitmap column

kangkaisen opened a new pull request #2966: Add more constraints for bitmap column
URL: https://github.com/apache/incubator-doris/pull/2966
 
 
   For https://github.com/apache/incubator-doris/issues/2965
   1. Add more constraints for bitmap column
   2. Add UT for bitmap and HLL constraints

----------------------------------------------------------------
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #2966: Add more constraints for bitmap column

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #2966: Add more constraints for bitmap column
URL: https://github.com/apache/incubator-doris/pull/2966#discussion_r382613233
 
 

 ##########
 File path: fe/src/test/java/org/apache/doris/utframe/HLLTest.java
 ##########
 @@ -0,0 +1,119 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.utframe;
+
+import org.apache.doris.analysis.CreateDbStmt;
+import org.apache.doris.analysis.CreateTableStmt;
+import org.apache.doris.catalog.Catalog;
+import org.apache.doris.catalog.Type;
+import org.apache.doris.qe.ConnectContext;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.util.UUID;
+
+public class HLLTest {
 
 Review comment:
   How about move this Test to the `qe` package. `utframe` package is only for definition of the ut frame.
   And how about making a unified `QueryTest`, and we can add any query-related test in it? Because I'm afraid if we start a mocked FE for each single unit test, the total time of running all unit tests will be much longer.

----------------------------------------------------------------
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] kangkaisen merged pull request #2966: Add more constraints for bitmap column

Posted by GitBox <gi...@apache.org>.
kangkaisen merged pull request #2966: Add more constraints for bitmap column
URL: https://github.com/apache/incubator-doris/pull/2966
 
 
   

----------------------------------------------------------------
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #2966: Add more constraints for bitmap column

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #2966: Add more constraints for bitmap column
URL: https://github.com/apache/incubator-doris/pull/2966#discussion_r382616051
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/catalog/Type.java
 ##########
 @@ -189,6 +189,19 @@ public boolean isStringType() {
         return isScalarType(PrimitiveType.VARCHAR) || isScalarType(PrimitiveType.CHAR);
     }
 
+    // only metric types have the following constraint:
+    // 1. don't support as key column
+    // 2. don't support filter
+    // 3. don't support group by
+    // 4. don't support index
+    public boolean isOnlyMetricType () {
 
 Review comment:
   ```suggestion
       public boolean isOnlyMetricType() {
   ```

----------------------------------------------------------------
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #2966: Add more constraints for bitmap column

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #2966: Add more constraints for bitmap column
URL: https://github.com/apache/incubator-doris/pull/2966#discussion_r382891112
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
 ##########
 @@ -303,30 +300,20 @@ private void analyzeBuiltinAggFunction(Analyzer analyzer) throws AnalysisExcepti
                          "group_concat requires first parameter to be of type STRING: " + this.toSql());
             }
 
 
 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:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [incubator-doris] kangkaisen commented on a change in pull request #2966: Add more constraints for bitmap column

Posted by GitBox <gi...@apache.org>.
kangkaisen commented on a change in pull request #2966: Add more constraints for bitmap column
URL: https://github.com/apache/incubator-doris/pull/2966#discussion_r382877661
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
 ##########
 @@ -303,30 +300,20 @@ private void analyzeBuiltinAggFunction(Analyzer analyzer) throws AnalysisExcepti
                          "group_concat requires first parameter to be of type STRING: " + this.toSql());
             }
 
 
 Review comment:
   Because there has the `type.isStringType()` check, HLL and bitmap is not string type. we needn't check HLL and bitmap again.

----------------------------------------------------------------
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] morningman commented on a change in pull request #2966: Add more constraints for bitmap column

Posted by GitBox <gi...@apache.org>.
morningman commented on a change in pull request #2966: Add more constraints for bitmap column
URL: https://github.com/apache/incubator-doris/pull/2966#discussion_r382618005
 
 

 ##########
 File path: fe/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
 ##########
 @@ -303,30 +300,20 @@ private void analyzeBuiltinAggFunction(Analyzer analyzer) throws AnalysisExcepti
                          "group_concat requires first parameter to be of type STRING: " + this.toSql());
             }
 
 
 Review comment:
   Why this 2 judgement can be removed?

----------------------------------------------------------------
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org


[GitHub] [incubator-doris] kangkaisen commented on a change in pull request #2966: Add more constraints for bitmap column

Posted by GitBox <gi...@apache.org>.
kangkaisen commented on a change in pull request #2966: Add more constraints for bitmap column
URL: https://github.com/apache/incubator-doris/pull/2966#discussion_r382877512
 
 

 ##########
 File path: fe/src/test/java/org/apache/doris/utframe/HLLTest.java
 ##########
 @@ -0,0 +1,119 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+package org.apache.doris.utframe;
+
+import org.apache.doris.analysis.CreateDbStmt;
+import org.apache.doris.analysis.CreateTableStmt;
+import org.apache.doris.catalog.Catalog;
+import org.apache.doris.catalog.Type;
+import org.apache.doris.qe.ConnectContext;
+
+import org.junit.Assert;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+import java.util.UUID;
+
+public class HLLTest {
 
 Review comment:
   I agree with you.  I also considered this point.

----------------------------------------------------------------
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: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org